With the engine stopped and the governor handle at "idle" does the gov to carb linkage move freely? If not, find and correct whatever is causing it to be stiff.
If the linkage is free, problem is likely carburetor adjustment (too lean at full throttle).
With the engine warmed up and running at full RPM, try pulling the choke out SLOWLY. If you find a choke position that makes the surging go away you've found the problem.
Solution is to open the carb load needle 1/4 turn at a time until the surging disappears. However if after opening the load screw 2 - 3 turns the engine still surges it's time to go inside the carb and clean it out.