Why Deep Space 9's security failed so badly in Tear of the Prophets?

Tear of the Prophets has one of the most jarring acts of security failure in entire tar Trek. Yes, there were many such acts before, buit they were mostly on TNG and rarely caused the death of a major charatcer. But, in Tears of the Prophets, Deep Space 9's security allowed a know enemy commander to beam onto the station, assasinate the station's current commander, perform an act of sabotage and then escape without being even noticed.

And yes, I know Dukat had a Starfleet shuttle, but shouldn't Starfkleet know already that this one shuttle was under enemy command? And didn;t they detect a transporter beam? Weren't shields up (and adjusted to Dominion technology)?

Or was it only because plot demanded it (so Jadzia can be killed off)?