Having checked the obvious (headset, wheel skewers, wheel trueness), I see that the suspension forks are worn. A test is to apply the front brake and rock the bike backwards and forwards. Sometimes this shows up a loose headset/aheadset, but in this case you could feel [and almost see] that the forks were worn. They should spring up and down but not forward and back!
Fortunately these shocks (Suntour XCM) come apart, and replacement inner sleeves are available. You can see the difference between the worn side (red arrow) and the non-worn side (green arrow) of the spacers. It’s maybe only a millimetre or two, but even this small amount gets magnified over the whole length of the fork, causing several mm movement at the ends.
The replacement sleeves were bought from eBay, and in this instance we’re in no rush and can wait until some cheap ones come along (they’re not very often available in UK for some reason; buy from other countries and P&P charges start to become significant). Here are the new sleeves ready to be greased and fitted inside the forks. The top dust seals were also replaced as the old ones were damaged; these are fitted with spray-on silicone lubricant.
Also we see that the shock absorber top tubes are pitted. The roughness was removed with a fine sanding block, followed by anti-corrosion treatment. With replacement forks on eBay going for around £40 it’s worth putting in a little effort to keep the old ones on the road.