If a base branch is deleted, does it close all active PRs on that branch?

I had a branch release/xx
And an active PR from feature/yy -> release/xx

Now I rebuilt the release/xx branch,
by deleting it and creating it again from master branch.
The PR was closed automatically, and at the PR page mentioned that I closed this PR.

Is this known behaviour?

Yes, this is the expected behavior because the base branch was deleted.

Let us know if you have more questions.

Is there a way to avoid this behavior? Like disabling a branch deletion if it has open PRs to itself

You can use the protected branches feature to prevent specific branches from being deleted. But there is no feature for protecting a branch if and only if it has PRs against it.

Let me know if you have more questions.

 yes you are  right

not sure how to avoid it but at least I found a way how to revert it.

Simply (temporary) restore the base branch (deleted automatically after the merge).

Go to your PR & re-open it. Change base branch to whatever you need.

Then again remove the branch (could be done from the command line).