When the Falcon gets captured by some bored tractor beam operator who has already reeled in fifty-eight survivors or visitors to Alderaan and not even bothered to watch the security teams drag the crews to the execution pits, she's just "the ship that escaped from Mos Eisley". There's no currently known way even Vader could connect that with Obi-Wan or a plan to rescue the Princess.
But the moment there is a hint of a Princess Rescue Plan, Vader should pounce at the opportunity to let it "succeed". He has already been frustrated at every other alternative, perhaps including Force-based interrogation (at which point we just need to ask whether Vader realizes he's getting blocked by a Force wielder, or has a blind spot like Kylo initially against Rey - either way, letting Leia go is a good move if he wants the rebels dead and further Force wielders located). He loves unconventional tricks, and always did, even before getting the mask. And in comparison with the other Jedi or the Clones, he always also loved complicated plans, and technology, despite his lack-of-faith demonstration here.
So the question goes, when exactly does Vader realize there's a Princess Rescue in progress? Probably only moments before he confronts Tarkin with the news about Obi-Wan's presence at most - he would have little reason to wait, or to lie to his formal boss about this. Tarkin is not in on any tracking plans yet, and even Vader may at most have formulated those, not yet executed them. But with something that simple and specific (in comparison with blocking the escape of four people from that city of millions), the actual execution need not take more than a few minutes. Dealing with Obi-Wan could be a separate process altogether.
Basically all the action where Stormtroopers demonstrate a lack of marksmanship comes after this. We may wonder whether the team that pinned the heroes down at the cell block already had instructions to miss and die, or whether only the later troops did. But of course it would be simpler to instruct specific hunter teams than to try and PA the entire station with the orders to commit suicide at the sight of a walking rug and his pets, especially when the heroes were known to be donning Stormtrooper costumes and would learn of any universal announcements...
Timo Saloniemi