How? There is a well established separate court system in Scotland so I think that part would be fine. But pretty much every other part of government would have to be built from scratch. A foreign office, a home office, immigration, passport office, etc. etc. etc.
Most of these are institutions are based physically in rUK so it’s not like they can be “split”