Most common reason for lack of power is the lack of fuel. I don't know your machine, but in all of mine, there is a main fuel filter and then a screen somewhere that's hidden. It could be just before the fuel pump, part of the fuel pump, or inside the fuel tank. In all 4 tractors, I removed the screen and added an inline fuel filter. Once it starts to happen again, it's cheap and easy to replace the inline fuel filter.
The other thing that it might be is the solenoid the turns off the tractor. When you turn the key off, it closes the fuel supply to the engine, and it stops running. This happened on one of my tractors. I was losing power and struggling to mow uphill. It was fine on flat land, or so I though. But once I got it to open all the way when running, I found that I had a lot more power!!!!!
Vapor lock in the tank is pretty rare. Air in the fuel line is also very rare.