Easy example: compare the Marvel "Civil War" comics to the movies. The former was critical of the military in a way that could not happen in any big blockbuster movie.
Is this better than explicit censorship? That's more of an open question.
It's not directly available. As in, you can't film on a US naval vessel or on a US military base without their support. Stock footage or footage from public spaces are allowed. You may also be able to get the support of another country or make use of mothballed or otherwise decommissioned systems if you have the right connections and money.
https://en.wikipedia.org/wiki/Crimson_Tide_(film)
Used footage of the real USS Alabama, used a decommissioned (and sold-off) submarine, and a French aircraft carrier.
Honestly, with the ubiquity of CGI in film, whether the military choses to participate in a film is hardly a barrier to making a movie.