I ran a few tests with UK surface fleets attacking Italian navy in Taranto
1 Surface fleets attacking fleets in port level 9 don't seem to suffer massively from port defences, even port 9. This presumably means you can attack enemy fleets in port in places like Gibraltar/Kiel/Portsmouth that really should be suicide due to port defences
2 Surface fleets can attack subs in port. Should this be possible?
3 Fleets in port which are attacked still get to evade the attacking fleet as if they were at sea. What is this simulating?
In the actual war, what examples of surface fleets attempting to attack other naval forces while in a well-defended port do we have? I can't really think of any. Of course the attack on the French fleet at Oran, but the V French and UK were not at war at the time, hence the fleet was caught unprepared.
My suggestion would be to really beef up the impact of port defences on attacking fleets, to the point that attacking a port level 9 would be near-suicidal.
I agree, major naval bases generally would have strong defenses against a naval attack e.g. Singapore, Gibraltar, Kronstadt, etc.