When receiving a message box asking your preference to change servers and avoid a crash, the procedure would be to not answer until ending combat and moving to a safe area to relog (alt + F4).
Generally, answering “Yes” freezes when there are no other instances available, and “No” returns to the character selection screen. When that unfortunate event happens during battle it’s not surprising to find a dead character next login.