Custom form on submit or on click of save changes take me to home page of settings

I have opened a submenu page called “My App Settings”. There, I render the following form:

It works fine, I can save the data and run the server function on the following events:

Except that… it does not work when there is a notification showing up on the top of the settings page. I have no idea why. This is the event that I have registered using jQuery:

In addition to that, I also have another event:

The weird thing is that, when the problem occurs, I’m redirected to the General Settings page, and the URL is: [base-url]/wp-admin/options-general.php&my-app-api-key=[value]

Has anyone experienced this and knows how to fix?