how do you actually stop having a crush if you can't stop seeing the crush? while being in a relationship (as a former khhv that is)

if the person isn't your friend (as if i had a single friend lol) but your partner's friend, it seems very hard to drop all contact when that contact is mostly the friend being invited over and visiting our place. or seeing the friend when we're out somewhere as a couple because we are all a part of the same "scene" and thus bound to see each other at these places.

looking for help on how to get rid of the crush because obviously it's a pretty bad thing to be having if you're in a long-term relationship, that much i know at least even if it's the first time this has happened to me.

so, is it worth the risk to just deny your partner having this friend over if it means it might help get rid of the crush? by being over i mean spending the night or several nights here a couple times a year, sometimes more sometimes less often. so far i've gone the "when the crush is over just avoid talking to the crush and avoid being around the crush as much as possible without looking too sus" route. but idk if that's the right way.