I'm not super knowledgeable about tractors, so this may be a dumb idea for something to check. But I went nuts trying to resolve a similar problem, so here's my 2 cents FWIW.
I have a 2005 TYM HST330, which was rebranded as the Mahindra 3510, and TYM also made the 5010. My 330 has a control near my right calf (below the seat) to route hydraulic fluid to the rear hose connection (such as if I were using a backhoe). It's super easy to bump and send fluid to the rear connections. When nothing is there, then you can hear the bypass valve complaining, but as a novice, it wasn't obvious to me. And yes, when that happens, I couldn't get my 3 pt to raise. Moved that control to the correct position and all was well again. It is very poorly placed and does not lock in place well at all, making it easy to inadvertently move. So I tied it in the correct position with wire and all is good.
You might check to see if you have similar valve control located in the same place.
I have a 2005 TYM HST330, which was rebranded as the Mahindra 3510, and TYM also made the 5010. My 330 has a control near my right calf (below the seat) to route hydraulic fluid to the rear hose connection (such as if I were using a backhoe). It's super easy to bump and send fluid to the rear connections. When nothing is there, then you can hear the bypass valve complaining, but as a novice, it wasn't obvious to me. And yes, when that happens, I couldn't get my 3 pt to raise. Moved that control to the correct position and all was well again. It is very poorly placed and does not lock in place well at all, making it easy to inadvertently move. So I tied it in the correct position with wire and all is good.
You might check to see if you have similar valve control located in the same place.