An update on how to replicate this. It only seems to occur when you press escape AND the quick slot bar is additionally added to the custom widgets menu on the "screens" menu under widgets.

When the quick slot bar is shown, but not listed on the "custom widgets" field under screens, the issue doesn't happen. I found this out during my jam game. It was working, until I set it to the custom widget field.
edit: tested out with skill bar as well, same thing. If it's set in the custom widgets field, it will disappear from the main player UI if you hit escape instead of the x