I checked this. Neither GitHub nor GitLab really uses directory-level permissions as its normal Git access model. Both have CODEOWNERS and protection mechanisms, and GitLab can get quite close to path-based write protection, but that requires Premium/Ultimate.
This actually seems to be another argument for one repository per project inside a common organisation. Then each project can have its own maintainers and write permissions without complicated subtree rules.