How to fix the "You don't have permission to save in this location" Notepad error in Windows 10?

2023-03-14--18-39-33

I have solved the problem by using Notepad++ instead of Notepad.
Notepad++ is able to relaunch itself in the Administrator mode and successfully save the problem files, e.g.:

2023-03-14--18-47-29

2023-03-14--18-49-16