1. BlueStacks already has a build-in feature root.
c:\ProgramData\BlueStacks_arabica\bluestacks.conf
bst.instance.Nougat32.enable_root_access="1"
But unfortunatelly it is not full root access. (e.g. you can't write to /system)
2. I saw the method via Kingroot, but that method will crash the all additional instances of BlueStacks.
3. I can unlock the main instance and install/update SuperSu, but I had complications of creating a new instances of BlueStacks. They will not work.
For this reason
I disabled the ability to get root access on the main instance.
You can get root accces on the second, third, etc. instance of BlueStacks.
Select the instance, Unlock. Start BlueStacks.
Install SuperSu. Update Su binary
Attention! BlueStacks 5 contains the critical error in the file bluestacks.conf - the same ADB port for all instances.
Therefore,
you have to stop any other instances when you will install SuperSu and update su binary. (We can change bst.instance.Nougat32.adb_port, but It is very inconvenient. I hope the developers will fix this bug in the future release.