It used to be really simple, under WiFi Settings, I could disable it. Now with one of the software updates that option is no longer available. The reason I want to disable it is at my apartment building if I go to my car or the laundry room or mailbox or whatever the phone will connect to an Xfinity WiFi hotspot but stay connected to that even when I return to my apartment, vs switching back to my WiFi, unless I turn WiFi off and on again on the phone. Plus it drains my battery when I'm in my car and it connects to random hotspots at red lights and stuff.
This is what Xfinity Mobile shows under their support as of May last year. Not very current.
@DaveO3 That is not a solution. I have the same issue as @mstk regarding apartments (high hotspot density) and repeated unwanted switching on a Galaxy S9. If I disable XFINITYWIFI then I throw the baby out with the bath water. I need that connectivity daily at work, at my family's house, etc. It's unacceptable that Xfinity gives only these 2 extreme options (no automatic connection or else no stability at home) and nothing in the middle. Especially when this problem never existed before 2020.