It is a good enough deterrence.
Chingchongs did the same thing, submarine maxxing and placing anti ship missiles on their own coastline and on the man made islands in the SCS to deter the carriers of freedom and democracy.
It is also why them and Russkies have prioritized development of Hypersonic missiles, precisely to deal with the carrier nuisance
There is also what the guy below writes, Indogesia and Malaysia won't let our ships transit, they are pseudo Chinese slaves kept from going full slave by Uncle Sam's fear