this just happened to me
26.3 snapshot 8
After dying in a hardcore world I am able to change my gamemode from Spectator to Survival by switching to LAN and not forcing the gamemode for other players, then I switch the LAN network again and automatically it forces me into survival gamemode.
I suspect this is a coding mistake because the setting for forcing the gamemode is the ‘other players’ section so first it should not impose this setting to you, and second it should check the player’s death count
this also happens in 26.3 snapshot 8