This was a regression in the v1.12.0 beta line. It was reverted and the fix is included in v1.12.0-rc1 and later. Upgrade to v1.12.0-rc1 or the final v1.12.0; do not stay on the affected beta.

_Source: gh:opentofu/opentofu#4019 (OpenTofu)_