The basic STS protocol contains encryption of the signature as shown in Wikipedia. https://en.wikipedia.org/wiki/Station-to-Station_protocol
If we would like to defend against MITM attack, this protocol will work even without the symmetric key encryption. A related question is asked here In the STS Authentication Protocol, why are the signatures encrypted?
The answer points out that some identity protection is enforced. However, I am not convinced that the identity of Alice and Bob are protected. A MITM attacker can figure out where the traffic is coming from and where the traffic is going to. It should be easy to bind the traffic from specific machine. Then use other unencrypted traffic from that machine, it should be easy to figure out who the machine belongs to.
Another question: Why A is protected against active attack while B is protected against passive attack?