It's the 'secret Coca Cola recipe' leaked to Pepsi situation: The source code is still protected by copy rights and patents. AMD cannot just take it.
For China and Russia to replace TSMC they'd need TSMC's (and ASML's) secrets, as well as nVidia's.
For example, we know that NVIDIA's SM are split into slice which allows to easily adjust the size of a SM without rewriting the whole code, but we don't know many details about it and in particular we don't know how exactly the interconnect between register banks and operands collectors is built within a slice and between slices.
This does not seem to be patented, and this is only one very specific example