I mean, yes [0]. It's probably the main reason SpaceX went to effort to recover [1] all the engines of the previous booster (IFT-4), which landed in accessible, shallow water in the Gulf of Mexico. The Raptor engines hold valuable secrets, particularly to China who are trying to clone a lot of SpaceX things.
The CIA did something very similar to this in the Cold War [2], though they used a boat instead of a submarine.
[0] https://en.wikipedia.org/wiki/Akula-class_submarine#Operatio... ("In August 2012, the news media reported that another Akula-class submarine operated in the Gulf of Mexico purportedly undetected for over a month, sparking controversy within U.S. military and political circles...")