IP-address definition is universal - all devices on the Internet have it.
GPS sensors are not present on all devices with Internet access, and the geolocation can also be faked. For example, Hola Fake GPS Location for Android, or LocationFaker for iOS with jailbreak.
The site may ask for your location, but you can deny it this data. Or your browser may not have this functionality.
IP address checking is more reliable, VPN / proxy is used by a minority
But what if you, for example, use a desktop (stationary computer)? Most of them did not have GPS. Plus you can turn off GPS on your phone / tablet. This is your right as a user in most countries. And the settings, well, for example, I live far from Russia, but I can easily turn on the Russian settings, for example. I like it this way. IP address is usually the best method for determining your location on the network. As for VPN. Many public VPN servers use a specific range of IP addresses. It may or may not be possible to find out your real location. But it is quite possible to determine that you are using a VPN service and, for example, block your access (as do some media sites, for example the BBC, where you can watch TV broadcasts online only with a British IP)