This is usually an easy fix. Just go switch the leaderboard to local plays, and look for that exact same play. You should be able to export the replay from there. If that doesn't work then the replay was lost.
I already had this bug and was only using the local leaderboard,unfortunely it happends again and i lost ever my local replays for some reasons,i still think this bug need to be fixed tbh since losing replays like this is kinda weird
There are a lot of reasons why your replays get lost, for example, If you lose "osu!.db" or it gets corrupted (unexpected shutdown, crash, reinstall etc...), your replays are gonna be lost, unless you're in the top 500 of the map.
However, if you have saved the replay before using F2, you should be able to find it inside your osu! folder and all you need to do is double-click it or drag it to your osu! client, otherwise it's gone for good.