Short answer is, you cannot stop them from producing Great Merchants whilst they are still annexed.
A fix for this, as previously mentioned, is to annex the city. However, this will increase future policy cost and increase unhappiness until a Courthouse has been built. IMO, it's very rare to upgrade from a puppet to an annexed city in the late game.
Two things I would like to add:
Firstly, if you have a puppet empire spamming multiple Great Merchants, you have already won the game and you shouldn't have to worry about one or two extra Great Scientists/Engineers. If necessary, use the cash boosts wisely for that extra kick towards a win.
Secondly, if you really do want more Great Engineers and Scientists, concentrate on generating faith throughout the game. Generating just 100 FPT from the start of the industrial era will get you multiple Great people by the start of the Information era, meaning you don't need to rely on natural Great person generation.
Hope this helps.