Stealthy shore to ship missiles have made the narrow, shallow Persian Gulf a death trap for American ships. If war breaks out the US Navy faces a debacle worse than Pearl Harbor in less than 15 minutes.
If a war breaks out where our CVNs can be threatened, the last place they’ll be is in an enclosed body of water like the Persian Gulf or Taiwan Strait.
We only send them into those places as peacetime shows of force, to increase sortie rate by decreasing distance to target and to mask just how far a carrier can be from a target in order to strike it effectively.
Our carriers can operate far out. VERY far out. Enemy subs will have to travel distance to get to them. Diesel boats will be limited by range and speed, nuke boats by noise. Plus other things ... ;-)