Transport is a devolved matter, so that shouldn't be affected. Although this is often confusing and badly reported.
The ScotRail brand was operated by the private company Abellio, who lost the contract due to long term failure to meet its requirements of reliability etc - was in trouble before the impact of the pandemic.