Hi
when you say you are hiding the Azure AD button, how are you achieving that? are you disabling it from site settings or hiding via JS?
You need to hide that via JS, my suggestion would be passing a query string param (something like azureadenabled=true) and validate that via JS, then you can show/hide the button
you can add your JS to the Content Snippet Account/SignIn/PageCopy, if you don't already have that snippet you can just create it
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.