Have the same problem with safari on iPhone. Just tried the code also, but didn’t work. For a workaround, if you press on the AA in the top left-hand side in safari and hide toolbar. It works as intended. Just not good for everyone visiting the site who wouldn’t think or want to do that.