British wartime intelligence went to great lengths to keep the secret. The high command even (as mentioned above, and downvoted for some reason) sometimes refused to act on Ultra intel, because they felt it could blow the gaffe.
There were some close calls, and the Germans must have had suspicions from time to time, but never to the point of acting on them, at least not concertedly and effectively.
Heck, if they'd just stopped saying "Heil Hitler" in every other message, that alone would have made the job significantly harder.