As I understand it, this behavior is unique to Windows. Neither Mac nor Linux has a built-in setting for automatically starting a terminal when running a program. I don’t know about other *-ix operating systems, but I expect they’re the same as Linux. not sure if my understanding is correct even.
Use a service to start and stop the code, this way there is no CMD window (and it also can run when no one is logged in) and it can restart itself on failure. PM me for more details if you need it.