What happens to the rebate if your deal collapses?

A rebate is a share of a commission, and commission is earned when a deal completes. If the deal does not complete, there is usually nothing to share.
Subjects or contingencies not removed
If you walk away during financing, inspection or strata review, the deal never firms up. No commission, no rebate, and normally no penalty beyond inspection and appraisal costs.
A firm deal that fails to complete
If the buyer defaults after removing subjects, the deposit is at risk and lawsuits can follow. Commission disputes between brokerages can follow too. A rebate is the least of the problems.
Presales that do not complete
If a developer cancels a project, deposits are returned under BC's deposit protection rules, and no commission is paid on the cancelled sale.
Moving on to the next home
Your rebate agreement usually carries on to the next purchase with the same agent.