Good modern enlarger lenses should not exhibit focus shift when changing apertures. Heck, we focus wide open then stop down two or three stops; if there were significant focus shift, it would show up there. Plus, stopping down increases the depth of field (and diffraction, so you don't want to stop down too far
).
It's pretty easy to check the aperture on an enlarging lens to see if there is a difference in size when you approach the click stop from more closed or more open. Anything that would make much difference should be apparent. If you're still worried about it, then always approach the desired f-stop from the same direction. No worries.
So, just close down to whatever stop you need for burning with the #5 filter (as long as it's not so small that diffraction is an issue), making sure you don't shake the enlarger or knock things out of alignment. Heck, you're changing filters successfully for different exposures, stopping the lens down should be EZPZ.
Best,
Doremus