This is duplicate of issue 1716 (closed by StaleBot).
GitHub api provides to do the following:
required_linear_history: true,
allow_force_pushes: true,
allow_deletions: true
https://docs.github.com/en/rest/branches/branch-protection?apiVersion=2022-11-28#update-branch-protection
The functions related to this 3 branch protection rules are not added in the class mentioned in the title.
PR #1723 was closed by the author, but this feature is still missing.