lock file not removed after running the ERC from the command line [CLI][ERC][KiCad 10]

Description

If you run the ERC from CLI, i.e.:

kicad-cli sch erc warning-project.kicad_sch

You get the report and a lock file: ~warning-project.kicad_pro.lck

Steps to reproduce

  1. As an example use: warning-project.kicad_pro and warning-project.kicad_sch
  2. From the shell run kicad-cli sch erc warning-project.kicad_sch

KiCad Version

Application: KiCad x86_64 on x86_64

Version: 10.0.0-rc1-10.0.0~rc1-3~ubuntu25.10.1, release build

Libraries:
	wxWidgets 3.2.8
	FreeType 2.13.3
	HarfBuzz 10.2.0
	FontConfig 2.15.0

Platform: Debian GNU/Linux 13 (trixie), 64 bit, Little endian, wxGTK, X11, , 

	wxWidgets: 3.2.8 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.88.0
	OCC: 7.8.1
	Curl: 8.14.1
	ngspice: 44.2
	Compiler: GCC 15.2.0 with C++ ABI 1020
	KICAD_IPC_API=ON
	KICAD_USE_PCH=OFF

Locale: 
	Lang: en_US
	Enc: UTF-8
	Num: 1234.5
	Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)