I would initially look at timing but your on electronic ignition so that shouldn’t be an issue.
If the engine revs drop to low (below 1000rpm) the engine does struggle and can make a knocking noise as it slow fights to turn.
That leaves me to carbs. I am guessing that if the bike has been stood for a long period then they could well be gunged up inside. I would suggest taking them off and doing a thorough strip down and clean. Check for any wear and tear and replace parts that look dodgey. There are refurb kits on ebay.
Once cleaned refit, prime and balance them. Also check the rubbers holding the carbs on are in good order. I would also recommend fitting new plugs too.