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.
26.3 snapshot 8
Can Confirm
i made a fresh new hardcore world and died instantly and done what you said causes this issue. it did actually set me back into hardcore mode again.