The earliest recollection of this bug is traced back to PAN-OS 8.1.11 - January 08, 2024.
This bug is fixed in PAN-OS versions 9.1.3, 8.1.11.
Fixed an issue where renaming a template stack did not change the value and reset to the original value after you commit the change.
For more information:
https://docs.paloaltonetworks.com/pan-os/8-1/pan-os-release-notes/pan-os-8-1-addressed-issues/pan-os-8-1-11-addressed-issues
https://docs.paloaltonetworks.com/pan-os/9-1/pan-os-release-notes/pan-os-9-1-addressed-issues/pan-os-9-1-3-addressed-issues