Identify and Avoid Pirates Before They Get Into Range
Pretty much all solutions mentioned so far involve losing your cargo (blowing it up, paint bombing it, etc) which should be your last line of defense, not your first. Your first lines of defense will simply be identifying and avoiding pirates before they can get close enough to steel your stuff.
The most useful tool in law enforcement is identifying the criminal. Most crimes can be prevented just by making sure that the would be guilty party knows that they will probably get caught if they try. To prevent crime, every ship would need something akin to a license plate, but instead of a metal placard, a space aged civilization would likely use something similar a digital TLS handshake. Unlike license plates, these encrypted license codes could not be faked easily. You would have to either hack the entire interstellar DNS network to redirect the handshake or steal the actual navigation computer of another ship. One task is virtually impossible, and the other is something that tends to get reported pretty quickly; so, faking your identification is not much of an option. If a ship transmits a verifiable code, then you know for sure that it is the ship it says it is. So, if it steels your cargo, then the police will hunt it down later, arrest the guilt party with thier own military grade transporters, and return your cargo to you.
If a ship does not transmit a verifiable code, the police automatically know to search and seize the ship since it is running illegally, and equally so, merchant ships know to not let illegally running ships get anywhere near close enough to them to get into transporter range to begin with. This could involve sending out a distress call, and trying to stay ahead of the pirates until police can intercept, or it could be a swarm of cheap decoys so the pirates don't know which ship to follow. It could involve turning off all power and letting momentum carry you through undetected, it could involve hiding yourself in the nearest comet or asteroid... so on and so forth.
Cargo is expensive, and having to delay a shipment by a few days to get around a possible pirate threat is WAY better than letting your cargo be stolen or ruined. And no, don't believe the lie that "there is no stealth in space". You can detect things from much farther in space, yes, but sensors have a maximum resolution even in a cold vacuum. Space just means you have a VERY long sensor range, which actually works to your advantage here because it means the distance between when a pirate is close enough to notice you, and too close to be fooled by simple means will be very long and give you lots of time to figure out a plan to evade them.
A Minor Frame Challenge
However despite authorities pushing for better encryption such as quantum encoding, most small businesses are reluctant to invest until there is some form of government subsidy provided.
This is a common misunderstanding for how encryption works. As the difficulty of encryption increases in a linear fashion, the difficulty of cracking encryption increases in an exponential fashion. What Quantum Decryption does is makes decryption much easier than it would be with non-quantum decryption, but it does not fully violate the exponential rule of increasing difficulty. When you encrypt something with 128-bit encryption, it means that a computer has to guess 2^128 (~3.4e38) possible solutions to crack your encryption. If you are trying to break 128-bit encryption with a quantum computer, it reduces this difficulty to 1/2 of the exponent meaning the computer only needs to try 2^64 (~1.8e19) possible solutions to crack your encryption. What this means is that a quantum computer can hack in a matter of minutes, what a normal computer could not hack before our sun turns into a Red Giant and consumes the Earth.
However, it does not take a Quantum Computer to create encryption that can beat a Quantum Computer. If you simply increase your key size from 128-bit to 256-bit then with a very simple software update, your existing computers will be able to render Quantum Decryption useless. This is not some big expensive upgrade, it is the sort of thing that the developer of your transporter protection software will have patched and updated within days of the first incident.
Hacking is hard, it is very hard. Preventing a hack (once you know about it) is really easy by comparison. As technology advances, the difficulty of hacking is increasing faster that the difficulty of preventing it, and all evidence indicates that this trend will continue indefinitely into the future.
Onboard computers still running on outdated architectures are unlikely to be replaced.
A 30 year old computer today is perfectly capable of running encryption that the best quantum computers being developed could not beat using a simple software update; so, "running on outdated architectures" is not an issue.
Suggested Change to Setting:
Use any explanation for why the pirates can now beat transporter blocking other then encryption. I would suggest something more along the lines of a more a powerful transporter. If we assume that a shield creates noise that blocks a transporter, then an adequately powerful signal should be able to overcome the noise. If the commercial ships are using simple fusion reactors, and the pirates get a hold of some military grade anti-matter powered technology, then the interference pattern may simply not be enough to prevent a transporter signal from getting through. Since this is a question of power generation and output, this would take a very significant hardware upgrade to prevent.