What if either of the events are called twice in a row? Then your function is “bugged”. This is a very bad way of making custom events making the caller able to break your logic.
Make two separate flows where one always create Load Menu and the other always create a Save Menu.
If you insist on mixing these two Custom Events then set a bool at the Beginning of the Events and use that throughout but then DO NOT use any latent functions or this will also break.