If AI is working on something for Defense I hope that the keep that computer isolated from the internet or any network.
How would you stop AI from sharing that work? How would you know
IMO, the genie is out of the bottle in terms of AI and its implications for society, personally I doubt any rules that might be applied to the development of AI will amount to nothing, there will always be people and nations who will use AI for evil purposes which allows the argument that we have to allow AI to do anything because we need to keep up with our competitors.
The US Government and Tech Companies will tell us that China, Russia, and other competitors were using AI to destroy us, therefore we need to use AI to destroy them first.