Broadlink rf learning is known to be problematic under HA. There is a proposal to improve this but it has stagnated: Add sweep_frequency service to RemoteEntity · home-assistant/architecture · Discussion #1076 · GitHub
Adding some supporting comments to that discussion may help move it along.
In the meantime it is possible to use a command line method to do more reliable learning. Takes a little bit of setup but you can then learn commands much faster than in HA developer tools: Y'all I really need help with learning RF codes on my Broadlink RM4 Pro - #24 by clockbrain