Try clear cmos settings via motherboard RTCRST jumper reset. then enter bios to change to AHCI. save. exit. unplug power cord to simulate a power outage.  connect cord and power on.  does it revert to raid?  If still revert to raid, but all other bios changes are remembered, try do a clean OS install using raid.   if you have a single sata drive it may not matter whether it is AHCI or raid.  
I have an 11 year-old Optiplex 980 that “forgets” that its system disk is AHCI every time there is a commercial power outage.  Once power is restored, the computer will not boot, and shows the number 3 on the front panel. Sometimes 2 and 4. To bring it back up, I have to unplug the AC power, remove the CMOS backup battery and wait 30 seconds, then replace. Then the computer will restart. I have to go into Setup, enter the date and time, and change the disk setting to Raid Autodetect/AHCI. After which the computer will boot to windows and runs fine, with no startup errors—until the next power outage. All other BIOS settings are retained. This has been going on for over a year. No, its not a bad CMOS battery. I’ve replaced it several times to no avail, and all the batteries I’ve tried all show proper voltage on a DVM. I’m thinking of putting Linux on this PC to experiment with, but not if the above behavior indicates it’s going to die soon. Any thoughts or suggestions? Details: Optiplex 980 tower, 8GB RAM, Crucial 450 GB SSD replacing original HDD, 1 TB western Digital HDD data drive, Windows 10 Professional.
BIOS forgets AHCI setting after power outage