There have been several other reports of sketch files unexpectedly gaining read-only attributes:
One of the affected users determined it was caused by a Windows update:
Something important to understand related to this problem is that Arduino IDE intentionally treats some files as "read-only" simply based on their location outside the sketch folder. That system does not use file attributes so it is not expected that the IDE would ever add a read-only file attribute under any conditions.