Frankly, I’m surprised actual Trek doesn’t have transporters being used as weapons that way.
We have seen Transporters being used in Trek to beam photon torpedo aboard other ships.
VOY made use of that in their fight against the Borg... twice.
Seska tried adapting the transporter module to Kazon tech too and executed Maje's of other sects by beaming them into space.
We've also seen in TNG that subspace beaming was used by a terrorist organisation to gen onboard ENT-D.
Its not that the technology isn't used in that way, its just that the instances when it is used in such a manner are not too common (probably because such tactics are hardly necessary in most situations).
Starfleet after all is a peaceful organisation... so they try to disable and engage in dialogue rather than destroy.
Transporter beams can be interrupted with transport inhibitors, dampening fields and stopped with shields (though anything and everything is permeable if you know the frequency of the field you're trying to cut through - that said, shields can be penetrated by transporter beams [assuming they are powerful enough] without knowing the frequency).
But generally speaking, given the existing transporter tech, I'd imagine that most of this tech is well regulated where safety guards are in place to prevent such things from happening.
And besides, the UFP is a type of society where most people wouldn't really have a need to weaponize transporters like that.
Starfleet certainly should have these measures on standby if the situation arises of course, but given that transporters can be stopped with shields and various fields, I'm thinking most heavily secure locations have transporter inhibitors installed by default.