How to reproduce:
- Go to a village and find a Nitwit, trapping it in a box for testing purposes. If there isn't a Nitwit, summon a villager with its "Profession" NBT tag set to 5.
- Do "/effect give @s bad_omen"
- Right click on the Nitwit
→ The Nitwit doesn't sweat.
Now, I'm no Java scientist, but I think the "sweating" effect overrides the trading GUI during a Raid. And if a villager doesn't display said GUI? No sweat! (Pun intended)