I experienced the same problem where a folder would consistently revert to read-only, preventing deletion. The solution provided by ChatGPT that worked for me was to boot into a Linux Live USB, such as Ubuntu, and delete the folder from within that environment.
The likely cause was that some Windows process had an open handle to your folder. By starting from a completely different OS, the folder is then not in use and can be deleted.
It's unlikely that the NTFS permissions were set to make it a read-only folder because such permissions aren't subject to random changing. However, your Linux Live USB, with NTFS support, would normally allow deleting such a folder. Did you look at the Security tab of the folder in Windows and determine that it was configured read-only for all users?
Or did you see the item labelled "Read-only (Only applies to files in folder)" and assumed that meant your folder is read-only? If so, that's a misdiagnoses. That has nothing to do with whether a folder is read-only or can be deleted. As it states in the label, it's only for setting or unsetting files in the folder read-only, and, as stated here many times, it does not even tell you if any files within the folder have actually been marked read-only (which would not prevent deletion of the folder anyhow).
The next time you encounter a folder that cannot be deleted, I recommend using PowerToys File Locksmith. It will usually tell you what process is preventing deletion of the folder.
There are other special situations where you cannot delete a folder, such as folders within WindowsApps or a folder protected by Controlled Folder Access, so there isn't just one answer, but it's nothing to to with the item labelled "Read-only (Only applies to files in folder)".
The suggested explanation, 'The likely cause was that some Windows process had an open handle to your folder. By starting from a completely different OS, the folder is then not in use and can be deleted,' doesn't fully account for my experience. In my case, the folder resided on a removable USB disk.
Step 1: I connected the disk to PC1 (Windows 10) and attempted to delete the folder immediately, without performing any other operations. The deletion failed, suggesting an open handle was unlikely.
Step 2: I repeated the deletion attempt on PC2 (Windows 11), again without performing any prior operations. This also failed, demonstrating that even a different Windows OS could not resolve the issue.
Step 3: Following ChatGPT's advice, I connected the disk to PC3 (Linux Ubuntu). The folder was deleted successfully.
Based on this sequence, I suspect a software bug in Windows 10 and 11 may be responsible for the deletion failure, rather than an open handle issue.