test domains getting recreated and errors on attempt to delete them

I would recommend jumping on edge:

cpcmd scope:set cp.update-policy edge-major
upcp

What you’re citing is caused by a clash between PHP 8.3, used in the next-release of ApisCP, and a codebase dependent upon PHP 8.1 in which ${var} usage was valid.

PHP 8.3 compatibility was introduced in September 2024. The year is now 2026.