Eeschema ERC dialog closed after doing ERC [GTK-specific?]

Description

This is in the current 7.0 branch (not in the 7.0.1 release, but now I realized this is almost the same as 7.0.2 tag).

The ERC dialog automatically closes after doing the ERC for some test cases.

Note that I'm getting a lot of bogus reports about missing simulation models. All power symbols are suddenly broken.

Steps to reproduce

  1. Use the test.zip files
  2. Start "eeschema warning-project.kicad_sch"
  3. Open the ERC dialog
  4. Start the ERC
  5. The ERC is done and the window goes away

KiCad Version

Application: KiCad Schematic Editor

Version: 7.0.1.1-36-gbcf78dbe24-dirty-deb11, release build

Libraries:
	wxWidgets 3.0.5
	FreeType 2.10.4
	HarfBuzz 2.7.4
	FontConfig 2.13.1
	libcurl/7.74.0 OpenSSL/1.1.1n zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.43.0 librtmp/2.3

Platform: Debian GNU/Linux 11 (bullseye), 64 bit, Little endian, wxGTK, gnome-xorg, x11

Build Info:
	Date: Mar 12 2023 16:40:58
	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.5.1
	Curl: 7.74.0
	ngspice: 34
	Compiler: GCC 10.2.1 with C++ ABI 1014

Build settings:
	KICAD_SPICE=ON
Edited by Salvador E. Tropea