There was a change in python>=3.12.10 which changed the behaviour of the venv-prompt variable: https://github.com/python/cpython/issues/132361
Unfortunately this was not noticed until after 3.12.10 was released and python3.12 is no longer accepting bug-fixes. The only workaround is to move to a different python version.