This is only an issue if you are monitoring the played signal.

What I do is turn off the monitoring of my guitar while I'm recording so the only thing coming through my studio monitors is whatever I'm playing along with.

I listen to my guitar part through another source. For example, if I am micing the amp as I play, I can already hear my guitar AND the backing tracks being played together.

If, after recording, the tracks are not aligned, its easy enough to slide the recorded track into position.