If it persists, maybe try a hard reset. If you google it, you’ll get an explanation from the Garmin support pages with details of the files you need to save and then put back on so you still have the right settings etc.
I’ve got an Edge 500 and while it’s never done this particular thing, it is a very flakey product. Each firmware update seems to introduce new issues.
My latest is the page/menu button gradually losing responsiveness until you can’t use it. But, you need it to do the hard reset, so it took me about 2hrs of turning it on and off the other night to get it to reset. (Hard reset is page/menu, power and start/stop at the same time, until the Garmin logo appears and then disappears).
When mine first started doing it, I assumed it was the button failing, but a software reset temporarily cures it, only for it to gradually deteriorate again.