'Protected Range leads to "Can't sync your changes. Copy your recent edits, then revert your changes." Google Sheet

I'm getting this error when I use protected range, whether I do it through app script or using Google Sheet "Protect Range" Menu.

My intention is to protect row number 1,2,3 from each tab on a sheet, it does work as intended and prevent people from editing the Rows 1,2,3 but it also prevents people from moving the Rows below. Im just trying to protect the headers and I cannot make sense of why this error is happening.

Here is the App Script Code:

function createProtectedRange() {

// Protect range A1:AN3, then remove all other users from the list of editors.
var ss = SpreadsheetApp.getActive();
var range = ss.getRange('A1:AN3');
var protection = range.protect().setDescription('Protected range');
// Ensure the current user is an editor before removing others. Otherwise, if the user's edit
// permission comes from a group, the script will throw an exception upon removing the group.
var me = Session.getEffectiveUser();
protection.addEditor(me);
protection.removeEditors(protection.getEditors());
if (protection.canDomainEdit()) {
  protection.setDomainEdit(false);
}

}

The result is the same if I use the Google Sheet Menu

Protect Range Menu

Any Ideas? All I need is to prevent individuals from changing the first top 3 rows. But still, give them the ability to move rows below. Keep in mind that there are quite a few formulas (Array Formulas) on the first 3 Rows.

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source