Yes as a person who had such a retention bonus before (from Google even) to me this seems rather cut and dry. Usually such bonuses are a mix of cash and RSUs, and set over a 3-4 year period. And are often also based on a perception of what the employees existing options were in the startup that they came from.

IMHO they should absolutely be paid out the whole amount of the remaining retention bonus at layoff. On the principle of things alone. Can't speak to the legality of it.