Can the government really do that? That is a pretty hardcore stuff trying to filter the IP address.
Yes. Way easier than you think. Restrict DNS seeds and then start querying most of the nodes that accept incoming connections would make it fairly hard for anyone to be connected.
But my question is, isn't VPN still connected to the IP of the country?
Doesn't necessarily have to be. It can be routed to another country as well. They can also treat traffic from data centers differently and choose not to restrict the traffic.