It’s possible a codeshare is cancelled due to operational reasons. If a flight is operated by a wet lease, then the codeshare for that particular flight will be cancelled if there are reasons caused by the wet lease operator. So if SN are operating this flight via a partner who can’t codeshare with UA, then the flight will still operate, but only as a SN flight with the UA codeshare cancelled. However, as SN and UA are both Star Alliance if the UA flight is cancelled, then you should be able to keep your seat as a SN passenger.
I hope this makes sense!