Not really sure exactly what will halp, but the problem with on and especially over ear in the gym is that your ears are going to get very hot and sweaty. I'd have thought the ones that are in ear but wrap over the ear are the way to go.
No idea how good they are, but something like this?
https://www.amazon.co.uk/Headphones-...gym+headphones
or
https://en-uk.sennheiser.com/pmx-686g-sports
Albeit, I've had a high failure rate with wired Sennheisers because the cord is rather flimsy