I checked with curl and no matter the user agent it will answer with a 302 to google maps, I don't know how it works that others say it will redirect them to the Apple Maps App.
With no query param it redirects to Apple sites. With query param, "Invalid protocol: maps:"
It shows 302 to maps.google.com here even using the website you give: https://i.imgur.com/y4jUdOn.png