It was more of a matter of sneaking stuff in.
Maybe but consider this exchange:
“Maybe we voted for the wrong man.”
“That couldn’t happen in Russia.”
“They don’t make mistakes.”
“They don’t *vote*.”
Plus the whole sequence where Cagney & Co. have to end up rescuing Otto from the East German police. Not a flattering picture of the commies at all.
If it had been made a decade later after Vietnam and the hippie revolution it probably would’ve been more pro-communist but thankfully it was made when it was.