It's governed by state law. Generally speaking, though, a deposit taken on an order or on a locate is contingent upon them being able to acquire the vehicle.
Y'know what,though? They told you up front that there would be a 2 to 4 month wait. They called you several times to tell you about similar cars that had come in. They tried. And, if they'd come up with the exact car when you'd been out of work for say, 3 months, would that contract have bound you to take delivery of the car? You yourself said that the extended wait was actually a good thing for you.
Prius supply is controlled by Toyota and the import distributor. As a dealership, you don't get what you ask for; you take what they give you. Speaking as a Subaru sales manager in the mid '90s, there was nothing like ordering 20 Legacys and 15 Imprezas and getting 15 Legacys, 10 Imprezas, and 10 SVXs.
If it were me, I'd take my deposit back and buy something else, and not look back.
My sister bought her car today. The $420 was the price difference from '04s to '05s. They gave her another $500 for her SLK230, making it $15.5k; it's the middle of winter in Chicago, and that's a little 2 seat roadster. They'll either make a killing on that trade or use it as a buffet table this spring. It's a risky piece to take in at that place and at this time. But still, local NADA on it is $17.8k with an $1850 mileage adjustment. I would have felt safe at $16.5K. The dealer threw in a bunch of free oil changes and inspections to make up for the $420, so she's happy.
Tom