I had a similar issue, I'd like to share how I fixed it. First I'll describe the context:
-- My script worked well, it opened chrome windows normally (not headless).
-- I used pyinstaller (with the onefile and noconsole commands).
-- The EXE worked but every time it opened a chrome window, it opened a console window as well, I don't remember what the window said, but it wasn't an error.
-- I tried the solution that Ahmed post, and it worked that day.
-- Next day I tried the EXE in various computers, and the problem came back.
-- I posponed that problem since it wasn't a fatal error and there were more important issues to resolve in my app. So while I was trying to fix another issue, I found this answer: https://stackoverflow.com/a/56839122/13988982.
-- Basically it said that changing the order of the commands that you use when you run pyinstaller, actually affects how the EXE file is packaged. (I'm not sure why).
-- I ran: pyinstaller --add-binary "chromedriver.exe;." --noconsole --onefile myApp.py
And that finally made the console window not to show anymore.
Hope this is useful for anyone.