Solved it finally: These are the settings in case somebody is interested.
in case the screenshot is badly visible: wm.context.toggle space_data.use_occlude_geometry