Insert javascript code to mautic that won't be remove after update

Hey there, it seems like mautic has problem with the login that cause a lot of problems.

I have found a solution to the problem here by adding this code to media/js/app.js file:

Problem is that after updates the code get removed.

Is there a simple way to insert that javascript or php code to the system and make sure it won’t be removed after update?

Thanks