QEMU has an option called -no-reboot (see also here), that causes the QEMU exit when the emulated target is rebooted. But since QEMU is called via idf.py, this option should be passed to qemu using the --qemu-extra-args flag as stated here.
So the final command to invoke in terminal would be like the following;
idf.py qemu --qemu-extra-args "-no-reboot"