Lots of people treat gods in a D&D setting like they're the heads of coexisting monotheistic religions, where the idea of working with another god or other powerful entity is clearly anathema and each god is clearly morally right on a fundamental level. But historical European and north African polytheistic religions, particularly the Greek, Roman, and Egyptian traditions that D&D draws from, viewed the gods really differently, they were more of just 'really powerful dudes who sometimes mess you up'. Worship and sacrifice wasn't done because it was fundamentally morally good, it was to gain advantage or avoid punishment, and was seen more as a bargain with a powerful patron or appeasement of a supernatural enemy than following correct commandments. People also didn't generally believe 'this pantheon is real, this one is just myths', they believed 'we have our gods, and they have their gods' and didn't think it odd that someone traveling in another land might make offerings to the local gods.
Also, in D&D most divine powers don't come directly from gods. Paladins and druids explicitly don't follow a specific god in 5e, and clerics can even worship an ideal instead of a deity. In older D&D (I definitely remember it in 1st edition), low level spells came from the cleric's own belief, mid-level spells from some kind of intermediary, and only high level spells directly involved the deity's power (I think the split was 1-3, 4-5, and 6-7). Within the background material, Ogmha's church (and I believe others) in the Forgotten Realms went through a great schism and split, which in the 'automatically lose powers' interpretation should have meant that one or both sides should have lost their powers, but neither did. It's not clear that a deity would actually even be able to remove powers from clerics (especially low-level clerics) in the default rules/setting, much less that it's automatic.
So while many people will run D&D deities as highly jealous and basically 'monotheistic gods that hang with other gods', I don't think that interpretation is supported by the rules, historical sources, or the description of the default setting for the game.