The problem is that, technically, an IP address doesn't have a country. GeoIP is at best a suggestion, and it is trivial to route your traffic through a "foreign" IP.
It is about as enforceable as "don't read letters written by redheaded people": it'll never be airtight, and it'll always have a huge amount of false positives.
The only possible "solution" is to ban all open devices from the internet, mandate a DRM-style "trust zone", have the device do mTLS, and embed a realtime DNA sequencer in every device.