In the custom sort panel, check "My Data has headers".
If the filter is applayd in the header this checkbox automaticly become disabled (Be careful).
Try to include headers in sorting range. This may cause problem if it's not included.
1. Lock or unlock wanted cells
2. Use "Allow user to edit range" in the protection. Include header in the range.
3. Finally, when you protecting sheet select only this checkboxes:
-Select locked cells
-Select unlocked cells
-Sort
-Use AutoFilter