Hello, friend!
Currently, type B dual-homing protection is mainly used in the passive optical LAN (POL) solution and requires the cooperation of the OLT, ONU, and aggregation devices. You are advised to set up a cluster or VRRP interconnection on the core switches to work with type B dual-homing protection to enhance the overall reliability of the solution.
The answer to your question is already in the prerequisites in the configuration file:

Therefore, before configuring B-type dual-homing, add the ONU to the OLT and bind the DBA profile, traffic profile, and line profile to the ONU.
I read the link you inserted. This link is more about Type B dual-homing configuration.
For details about the working principle of Type B dual-homing, visit the following link:
Dual-Homing xPON Type B Protection Principles
If you have any questions, you are welcome to post the Ask for Help post on Access Network Forum.
We'll study together.
Thanks!