I had a similar problem with converting a PySide6-based application with auto-py-to-exe. I launched the latter from the project's venv from PyCharm's terminal, but the problem was that I did not install auto-py-to-exe in that specific project, so the application launched from the system Python environment (where PySide6 was not installed).
What I did was I went back to the terminal, and installed auto-py-to-exe to my virtual environment. Launched it again, and with no additional settings regarding PySide6 the build completed well. If you are not using PyCharm you might have to activate your virtual environment first.