Saving a webform programmatically in a custom webform handler throws "Entity validation was skipped." I am trying to save a webform submission inside the postSave in a CustomWebformHandler class.

class CustomWebformHandler extends WebformHandlerBase {
[..]
     public function postSave(WebformSubmissionInterface $webform_submission, $update = TRUE) {
        $data = $webform_submission-&gt;getData();
        $data['ssa_attachment'] = $doc_id; //doc_id is retrieved with a query
        $webform_submission-&gt;setData($data);
        $webform_submission-&gt;set('in_draft', TRUE);
        $webform_submission-&gt;save();
     }
}


I get the following exception.


  Uncaught PHP Exception Drupal\Core\Entity\EntityStorageException: "Entity validation was skipped." 


I tried to validate before saving and I get this exception.


  Uncaught PHP Exception Drupal\Core\Entity\EntityStorageException: "SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction: SELECT w.next_serial AS next_serial\nFROM\n{webform} w\nWHERE webform_id = :db_condition_placeholder_0 FOR UPDATE;


How can I trigger the validation before saving?
The WebformSubmission::resave() method prevents the ::save and ::postSave recursion issue from occuring.