Hello,
If the power goes out, Windows itself cannot keep any unsaved data in memory.
When the PC loses power, all programs are forced to close immediately, and only the data that was already written to disk remains.
After the power returns, Windows will start normally, but any unsaved work from each program will be lost unless the app has its own recovery feature.
Sudden power loss interrupts the write operation, and the affected sectors may contain incomplete data.
When the power comes back, any file that was being written at the moment of the outage may be corrupted or unreadable.
This is the normal behavior of Windows during a sudden power loss.