How to change security index's replica shard count?

I have found the reason at the following links

In 8.0, we’ve made several changes to protect system indices from direct access. To access a system index, you must now have the allow_restricted_indices permission set to true.