When two players are fighting a warden, the warden will only attack one of them.
A warden could be chasing the target player whilst another player attacks it from behind. The warden will never turn around and switch to the other player.
If a player attacks a warden that is fighting any other entity, however, like an iron golem for example, the warden will turn around and attack the player, but will never switch back to the iron golem, even if it damages the warden.
Thank you for your report!
We're tracking this issue in MC-249885, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as working as intended, which means this is not considered a bug and won't be fixed. Please do not leave a comment on the linked ticket.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki