The frustration that comes with renaming a layer has me not using the "OK" button upon renaming, but using "the return/enter key" instead. At least 50% of the time that works where using the OK button doesn't work more times than it works. This is such a hassle that sometimes I don't even change the name of the layers. Now that's dysfunctional.
Please fix this.
Have this problem with P2021 on M1 Mac Mini with Big Sur. Didn't have this problem with P2020 on iMac with High Sierra
Update: Rather than use Layer Rename or try to rename in Layer Attributes (neither of which works 100% of the time) I can rename a layer by just double clicking on the layer name in the Layers Panel. That highlights the current name and I can type over with new layer name. Whether this approach works 100% of the time will require more testing