Can you share the map file here, so we can take a look?
Also note that the advanced keyboard & mouse editor regularly saves the map as you're mapping, so you'll have backups of the map in the Documents\Trackmania\Maps\Autosaves\ folder.
However, if you believe the issue you experienced is a game bug, you'll need to report that on Ubisoft Discord, as TMX forums are community forums.