Movies could be made with purpose built guns.
These guns could be rebarrelled to fire only blanks in a unique cartridge size.
Live, factory size cartridges could not be chambered.
It would be a huge expense but it could be done.
Basically they would foot the bill for a huge supply of wild cat blank cartridges to be manufactured for their purpose built non-functional firearms.
It's probably not too difficult to retrofit firearms for this type of niche usage. Since they would be blanks, you wouldn't have to rebarrel the firearm.
But you're probably overthinking it. Nobody is forcing these actors and crew members to take jobs on sets where firearms are being used. Just don't take the job. Enough people boycott gigs on Law and Order and the problem will take care of itself...