If it were me, I would stay until the bonus was paid. In a previous employment, people lost out on a March bonus by leaving in January, and in another case, someone else lost out on a bonus once they handed in their notice, even though they had stayed past the payment date.
Most of the time a bonus would appear to be discretionary, certainly the amount.
There is/was a case ongoing where bonuses were deferred and then withheld when the employees left involving a large stockbroker (I'm not aware of the outcome).