Unless you have software like Process Lasso: Process Lasso Automation Features
It can automate and persist CPU affinities.
I recommend reading our guide and of course sharing your results with us.
I’m particularly interested in seeing your results with set up processor affinity and results without changing it.