Ihave a similar scenario on my AI logic, check XY override also Z, think it should help since it will override current velocity , sometimes (if it doesn’t help) you can try disable movement on that moment.
Let me know if it works. I use same for a logic that AI overcoming obstacles to reach a target where agent height is not meant to climb.