This works perfectly with all browsers without any errors. But when I click
Site Settings on any of my sites in my site collection the button disappears.
This happens only in Site Settings. I have included the correct master page in the Site Settings so there is no issue with that.