The reason why these scammers are still caught even though they can hack and make off with millions of dollars from their victims is because there are still smarter people who are better than them. Because usually these scammers have patterns and traces left behind during their operations, and this is what the authorities use to track or lure the scammers out of their hiding place. So there's no need to be surprised why these scammers can hack so well but can still be caught by the authorities.
Evolving technology is the reason why these people can be tracked. After all, intelligence is also quite smart in uncovering cases like that - they can even wait patiently for a long time until the perpetrator is revealed. It is also a consideration that someone does not need to avoid tax if they have a lot of assets – the government and law enforcement will most likely be able to uncover this.
If a hacker or scammer can to hide for a few years - then maybe they will be caught after a few years after that. Centralized exchanges can also work with governments to uncover many cases like this - so there is no safe haven for scammer or hackers.