this is a complicated reply and I hope you can make sense of it
remove the lever link from the transmission link. Take the little pin out so you can rotate the valve on the transmission. Leave it be for the moment.
Now take the filter off the front of the transmission. When you take it off (engine OFF of course), look closely behind the filter. You will see a hole at the top, approx 3/16" diameter. If you rotate the pto valve with your hand while looking through the hole, you'll see how the valve works. It is rotated by the pto lever linkage, and when rotated to just the right position, a hole in the valve lines up with the hole behind the filter. Or, that's how it's "supposed" to work.
A lot of times after the mower sits a while, the valve becomes "sticky" in the bore. As soon as you start the mower and put some heat in the transmission, the case expands and lets a tiny amount of hydraulic fluid get between the valve and the case, which lubricates it. However, that takes time and most of us don't wait that long, we grab the pto lever and give it a push to engage. If the valve becomes sticky, we just push the lever harder, bend the lever, and once it's engaged it's not quite right. I suspect you have this issue.
Now then. Grab a drill bit or a pin a litlte smaller than the hole in the case behind the filter. Rotate the pto valve until the hole lines up, stick the pin into the hole so it goes through the valve. This will hold the valve in place while you bend the lever/linkage back so that the valve is "on" while the lever is in the "on" (locked on) position. Once this is achieved, remove the pin/bit, reinstall the filter (or a new one), reconnect, double and triple check everything and then you should be good to go.
I would suggest starting there and see how goes it. If any other question post it up. I have a suspicion that it should solve your issues.
while you're at it, check the gearbox oil level. The deck gearbox that is.