Delay one of the earlier services by (no more than) one hour and pay the staff overtime as appropriate. It is not acceptable to run 25 of 30 scheduled services, where two of the cancelled services are the last of the day.
If I were in a team struggling due to staff shortages and I refused to deal with an urgent matter because it's "not my problem", the next day on arriving at work I would be handed my P45. I am obliged to act co-operatively and sometimes this means working overtime, for which (not being shift work) I don't get paid.
I expect you will reply that the railway is somehow different, even to safety critical sectors such as healthcare and construction. Perhaps it is different. Perhaps. As a passenger and taxpayer, I don't care.