Actually something of a similar nature occurred during WWII. Dewey and the Repubs knew that we were capturing intel from the Japanese via Magic. They were prepared to use it to their political advantage and embarrass FDR by suggesting he knew Pearl Harbor was going to happen. Marshall intervened and presented the case that revealing Magic would cost lives and treasure in the Pacific campaign. Dewey relented, a true patriot.
Reference Marching Orders, Bruce Lee, page 244-246.
Hard to imagine any Democrat doing that today ....
schu