Not sure if this is a known issue, did not find it in Tech Support forum or in FA Gitlab:
When a Harms is being built, it sticks out above the water and is visible to units with surface vision. Ships that target surface units, cannot target the Harms that is being built though, they get an icon showing that it is impossible to target the unit. (But when they happen to shoot and the Harms is in the way, then the Harms will take the shots.)
Replay 7054955