If running with the filler cap open fixed the problem, what would be the fault? Thanks.
I am assuming that the GS has a vaguely similar fuel system to the RT and there is a rubber breather pipe exiting the bottom of the bike somewhere near the footpegs. Bikes destined for North America have a small charcoal canister in this pipe to trap petrol fumes and any spillage from a drop, as well as equalising ambient and tank pressure. European bikes do not require this and so the upstream and downstream bits are just joined together with a short piece of internal plastic tube rather than a continuous one - this collects debris over time and if it is partially blocked will cause the fuel pump to struggle against the vacuum now in the tank
The easiest remedy is feeding a new length of rubber tubing from the spigot down through the frame and leaving the existing one in place
(As an aside, the RT’s plastic tank can deform under these condition and after a long fast run it will jam up against the left strut giving the false impression of a completely flat front tire - the temporary cure is to pop the filler cap open occasionally to allow the tank to breathe DAMHIK)