Does it also shut down when the brake is released. If so then look at the seat switch as a problem. If releasing the brake doesn't shut it down, then remove the belt from the engine pulley that runs the deck and then try engaging the pto. If it still shuts down then there is a safety switch problem which could also be the seat switch or some other safety switch.
If it keeps running with the deck belt disconnected then you have a problem with the deck and not the tractor.