But that someone wasn't even one of the assassins (it was Valeris) so there was no need for them to beam aboard the Enterprise. Spock's reasoning is inept and he was right only by pure accident and also because the deck was stacked by the writers in his favor.
While it could be plausible that the magic Klingon ship they just speculated into existence might, in addition to being able to fire while cloaked, also carry stolen Starfleet uniforms and weapons* (assuming that we're assuming we're still in one of the epochs where cloaked ships can use their transporters), once you've concluded that there must be at least one conspirator aboard the
Enterprise, it seems eminently logical that the Starfleet conspirator also provided the Starfleet equipment for the assassination. If the database
hadn't been altered, it would've been more plausible that the entire thing was orchestrated by the second ship, but the fake entry proves the
Enterprise was already compromised.
If the assassins had beamed aboard the Klingon ship the effect would have been the same and Spock would never have found any evidence to catch Valeris, at least not any evidence spoken of in the movie. In fact, it's what they should have done. It's like they did that just to give the Enterprise crew, clues to find them!!!
Remember, they were all supposed to be dead or on a severely damaged ship. Kirk wasn't expected to surrender, he was supposed to defend himself (or so he'd think) and leave both ships destroyed or crippled, where incomplete and contradictory evidence wouldn't matter as much. The setup required each side to believe the other one had started the war. If either one thought their own people had gone renegade and tried to derail the peace treaty, they'd try to make up for it and keep the peace process going, so there couldn't be any weird loose ends like the assassins being found on the Bird of Prey that rode in like the cavalry to save the Chancellor from Federation treachery, or there not being any reason at all for the
Enterprise to think they actually had, somehow, fired (because if they were so sure they didn't fire, Kirk might do something wacky, like surrender and hope the truth would set him free).
Which is all a pretty long walk to get to, "No, I don't think there's a good reason Spock should've just given up and assumed the assassins must've beamed over to a ship
they weren't sure actually existed and that they were totally screwed."
*And, yes, I know, the Bird of Prey used red Starfleet torpedos instead of green Klingon ones, and there was the cut subplot revealing that Federation torpedo manufacturers were in on the conspiracy.