I had a similar problem a while ago:
https://www.theanswerbank.co.uk/Home-and-Garden/Question1551344.html
The solution that worked for me, was to wash at 60 degrees and use an antibacterial laundry cleaner.
I don't know if the 60 degree temperature, or the antibacterial cleaner did the trick; or if it was a combination of doing both that worked.
Either way, the clothes smelt nice and fresh afterwards :)