No it is not 'accurate' that sonar works while surfaced.
It could be done but it was highly degraded due to background noise.
Not the rock solid plots we get now.
Reminds me of that scene in Up Periscope.... "Sir someone just dropped 40 cents". "Are you sure ?", "Oh yes sir a dime a quarter and a nickle