code: private function writeScenProtect()
      {
          // Exit if sheet protection is not active
          if (!$this->phpSheet->getProtection()->getSheet()) {
              return;
          }
  
          // Exit if scenarios are not protected
          if (!$this->phpSheet->getProtection()->getScenarios()) {
              return;
          }
  
          $record = 0x00DD; // Record identifier
          $length = 0x0002; // Bytes to follow
  
          $header = pack('vv', $record, $length);
          $data = pack('v', 1);
  
          $this->append($header . $data);
      }
docs: Write SCENPROTECT.