On my n scale flex track at the end of the track two of the rails are not in properly
If the “fishplates”, i.e. the part of the tie that holds the rail onto them, aren’t damaged then you can cut the connector between the ties a few ties away from the end, slide the severed section out until the disconnected ties are past the ends of the rails, and then slide them back on. If you plan on tacking the track to the roadbed and ballasting it, the ties should stay in place. However, my experience has been that once they come off it will be a hassle to keep them in if you keep handling the track or don’t make it secure.