Please check for any power automate flow associated with the folder. The error message is mostly related to it and most likely for the configuration is set to Restrict Delete.
Alternately, you can select the vertical ellipsis, then More, then Publish.