With SMBX that isn't possible directly, however, there are some workarounds possible, and the best practice you can get with TheXTech and its ability to resume the game at the last-entered door but should work on other SMBX branches but you'll need to use the different way.
So, look at the ugly workaround idea:
- Make the HUB-based episode
- Build the hub level (intro level with doors) that will be fully black and hide the player in the darkness
- Make the startup event that will hold the "LEFT+UP" keys
- Set up the "Restart on death" flag
- When you quit the game in the middle of the process, the player will resume (in TheXTech) at last door where they exited and will start playing the level where the player got stuck
- hub should be fully automated, the player shouldn't interact with the hub
I'll try to craft some simple examples to show you how the thing would work.
Also, there is the possible more complex way that would work on other branches too:
- at the exit of every level put the star
- every star should add the instant warp that leads to the following door, making sure the player will resume level at the last taken star
This is a more tricky way to perform, other ways will require you scripts making episode being incompatible with the rest of branches.