I can see in the transaction log that the (custom) python library 3.12 is successfully loaded. If you haven’t found this article, it mentions installing the full version? Running PyQGIS in FME PythonCaller transformer? | Community or pointing the python interpreter to the QGIS install under Windows\\SysWOW64 or C:\\OSGeo4W64\\apps\\Python%\\lib')
I encountered the same issue when using PyQGIS inside FME. I found that defining PYTHONHOME and PYTHONPATH in Windows (if you're a Windows user, go to System Properties > Environment Variables) can help address this problem. You can create these two new variables to specifically run Python inside PyQGIS:
Keep in mind that if you're using Python in other environments and need to access other libraries, you’ll need to remove or adjust these environment variables to use the default Python interpreter.