Liquid malt extract kits
Like others, I don't think it's an infection.
It could be the quality/age of the liquid malt extract. There were some threads on here a few years ago and we concluded that liquid malt extract was much more susceptible to off flavours than dried malt extract. Really hard to pin down why, some was fine, some wasn't, so like your experience some brews were OK and then others weren't.
Many of us gave up on liquid malt extract after that, because you could never guarantee quality. Although we were brewing with pure LME and adding hops in a boil, rather than pre-hopped kits, which is what I think you're brewing. It might be worth changing the source of your kits, maybe they've been hanging around on the shelf too long?
Alternatively, if you have a decent sized stockpot or can get one off eBay, give something like this a go: these kits use dried malt extract and aren't re-hopped, so you need to do a boil, but I bet you get better beer, never had a bad one with these
https://www.brewuk.co.uk/beerkits/craftybrews/brewextract.html