How to detect when player rejoin on singleplayer world

I asked chat gpt how to do it and he said that there is custom:game_leave scoreboard or something like this but im not sure if he is telling the truth and i cant check directly in minecraft right now 🙁

Continue to help post