Order it as a spare part through any authorised Shimano dealer/Service centre
When your smallest sprockets wear past a certain point it stands to reason they will no longer be useable with a new chain. so at that point STOP trying to run new chains on it.
Personally in your situation I'd just ditch 12 speed altogether, fit a more suitable gearing range for the riding you do then let it all wear together instead of swapping/rotating chains. But look after it better. incl always shifting as smoothly as you can (By simply doing this I get 10 to 20 times the mileage you do out of your cassettes)