I think it's just one of those things you need to notice yourself... because eventually we have to be able to pace ourselves without metronome. Though I would imagine that tools such as that fading metronome would be a good aid. And recording ourselves, to notice all the things we're blind to when playing.
When I find out I did it, I give myself a very stern warning to pay more attention next time. One example was blues lesson 7. Remember how I went back to it to work on staccato left - legato right hand?
I recorded it again, slower so I could concentrate on that. To my horror I heard it speed up throughout. The two recordings are still there for all to notice 🤕
My solution is to try and be more aware of it. When a piece should be played slower than I can (rare, but happens), I try to remind myself not to rush, keep it steady... and it seems to keep me in line for at least a little while 😁