Geofencing Active Flight Modes

In what Flight Modes is Geofencing active? Only in Position or also for Mission and Offboard Mode?