This was because the main_fb was not bound back to be updated. Following draw calls were drawn without depth buffer.