This is surprising, as the version of polkit that comes with Debian
12 is capable of using JavaScript rules.
For libvirt that's /usr/share/polkit-1/rules.d/60-libvirt.rules,
which implements the same logic as the pkla rules did in previous
releases, namely that members of the "libvirt" group should be
allowed to manage the system instance of libvirtd.
I have tried just now with a fresh installation of Debian 12 and
everything seems to work as intended.
This doesn't look right for Debian 12, you should be running 6.1.0.
Is it possible that you haven't rebooted the machine after performing
the upgrade? The new version of polkit, which can read the JavaScript
rules, will only take over at that point, so if you haven't rebooted
yet it would make sense that the pkla rules disappearing would cause
the currently running version of polkit to no longer grant you access
to libvirt.
This version of polkit should be perfectly able to process the
JavaScript version of the rules.