This exact thing happened to me yesterday. And I'm using an ancient version of YAM-BMS (it wasn't even called that then)Are you using the LuxPower protocol as well? I've seen it sit like this for 12 hours, but restarting the esp32 doesn't immediately resolve it. Maybe it takes 5-10 minutes after resetting the esp32 and I'm getting too impatient and starting fiddling with things, eg I thought maybe enabling the heartbeat monitoring resolved it but I had also reset the esp32 10 minutes prior.
EDIT: Also mentioned above but I looked at my data and I'm positive that toggling the heartbeat monitoring switch cleared it, when I toggled the switch the inverter immediately started charging. If I have to I'll find a way to monitor the inverter charging status in HA and then toggle the heartbeat monitoring on and off if YamBMS is in the bulk state and the inverter shows charging is forbidden.
LUX protocol, SNA 5k
Fiddling with the force charge and full charge CAN switches somehow started charging normally. That is all the information I have at the moment.
These inverters can be quite a black box sometimes.