You can probably go either way with a 4" can. I usually pull them out if I can't get my 24" but you are only 2" off which isn't bad at all. The only issue about closer is the closer to the cabinets the light gets the more splay of light on the upper cabinets.I only mention it because it bothers some people.
Paul