The current WebXR spec does not address the case of the XRSession's ended value already being true when end() is called.
Can we add a step to https://immersive-web.github.io/webxr/#dom-xrsession-end to reject the promise with an InvalidStateError DOMException if ended is already set to true? Looks like Chromium has implemented this behavior (see https://github.com/chromium/chromium/blob/master/third_party/blink/renderer/modules/xr/xr_session.cc) and WebKit will be matching that behavior (see https://bugs.webkit.org/show_bug.cgi?id=220835).