OK, I figured it out. Sort of.
When pretext is installed via pipx, it's placed in a virtual environment, and playwright is installed as a dependency. It ends up in the bin folder of the virtual environment.
Playwright itself is not added to the path.
I don't really know why things fail when playwright tries to install things on the fly during a pretext build.
But ahead of time, you can find where pipx put the virtual environment and open the bin folder where playwright lives (for me, this is ~/.local/pipx/venvs/pretext/bin).
Apparently pipx is set up with permissions that do not allow me to manually activate the venv.
But in that folder, I was able to do './playwright install' to install the necessary browsers, and now everything works fine.