This is by design as the devmode is not really a part of the Game UI.
Since you seem to be working in a scenery editing context, you can group the Project Editor and Scenery Editor in the same window and enable the Project Editor before taking your screenshot.
It will hide all the Scenery Editor lines.