If theres plenty of gap then the vhances are that extra 2mm of shock stroke wont matter(depending on your frame and its leverage ratio)
This… But with the caveat that most frames typically have somewhere around a 2.5:1 leverage ratio, which means 2mm shock stroke will mean the wheel moves 5mm, but even then, leverage ratios from 2:1 to more than 3:1 are also not uncommon.
You then also have the wheel/tyre/swingarm deflection when bottomed out to take into account too. I’ve seen a frame that nominally had 10mm of tyre to seat tube clearance when the shock was at full compression begin to eat its seat tube, because the rear wheel was (to put it mildly) looser than a whores drawers (“Vertically Compliant” is how the road bike marketing men would describe it I believe!). But even a stiff evenly trued wheel will deflect a few mm when bottoming the shock out, so bear that in mind too when it comes to wheel/tyre/frame clearance.