To remove write protection from the SD card without losing data, you need to:
• Switch on/off SD card physical switch
• Use Diskpart.
• Use Windows Registry Editor
• Remove write protection using the group policy