From my haphazard testing, it depends on the particular website. 😓
esc will exit fullscreen on this site (orionfeedback.org), clickup, google cal, but does not in gmail or supabase. It also doesn't in google docs, but only when the editing area is focussed - if you click the blank space on the toolbar above the document then press esc, fullscreen will exit.
An option to ensure only the explicit shortcut exits would be most welcome. 🙏🏻