Restart Dps after defeated raid
DPS or CP? and what city? Idk about DPS but when visiting SF and grinding near the piers, I have either that happen (I can only think golden razz) OR the gym filles with mons within 1 to 2 seconds, no joke after taking them down to 0 and the battle animation that it is being taken down by another team is already happening. I can never place a mon in a gym there in some areas. In fact, I have had it happen that I helped take a gym down, it turned gray, I tried to add a mon and it told me that battle winners have priority, of which I was a part. go fig. In NYC near where I live it happens too, less often but it is frustrating. I can't tell what is happening because there are so many buildings within reach that you can't always see everyone. It doesn't matter what time of day either.
When a gym is defeated the "battle winner has priority" is referring to the specific person who finished off the HP of the last mon in the final fight, not always easy to notice who that is if there are several attackers, but when I attack a gym with only my roommate and myself one of us always has to wait for the other to place a mon after the gym is defeated before the other person can do the same. And if there are a high number of players in the area on various teams, it's entirely possible that they can begin attacking the gym that's newly under your team's control before you even get a chance to place your own mon, which will then prevent you from doing so since it's under attack.
An unfortunate eventuality of such high population areas like NYC and SF, but you probably get the trade off of never lacking for raiders against high level raids, my roommate also spent a few months in NYC recently and was dismayed upon his return to the midwest that raids here almost always lack enough people to complete if they have any at all, as opposed to a full lobby of 20 for every single raid he attempted in NYC.