You may use either LAP or switch and restore PPAGE. How to use LAP is shown in CW example. Please find DEMOQE128_LAP_Dictionary in CW Examples folder. .
When switching PPAGE, you shold provide that your routine is located in nonbanked flash (not within PPAGE window 0x8000-0xBFFF). For banked applications also you need to restore PPAGE on exit from your nonbanked program/erase routine.
Like I wanted to say, you can't use C bitfields or bit set code with FSTAT register, because this may write more ones to FSTAT register and clear flags, you are not intended to clear. For example FSTAT |= FSTAT_PVIOL_MASK and FSTAT_PVIOL=1 both will attempt to write one to FCBEF bit and try to launch flash command!
Bit set and bit fields can be used only with flags, that are packed one flag per flags register, and still with some restrictions. Ack bits like IRQACK, LVWACK and others have no problems at all. Toggling bits in their registers won't write one to ACK bit, which read always 0. But what about comparator bit ACF? Yes, fine, you can set it to clear without any side effects. But what about toggling other bits, for example ACIE? Certainly it will clear ACF and you may loose important interrupt event if not done properly, making write to ACMPxSC with ACF bit cleared, like this to clear ACIE
ACMP1SC = ACMP1SC & ~(ACMP1SC_ACIE_MASK | ACMP1SC_ACF_MASK);
or this to set ACIE
ACMP1SC = (ACMP1SC | ACMP1SC_ACIE_MASK) & ~ACMP1SC_ACF_MASK;