Bid stays with you. If you leave the FC and win you can't claim the property for yourself or a new FC, so you will need to eat the 50% gil loss. Wait until the claim period is over and get the 50% refund.

If you lose then you get all the gil back.

There is some chatter on various discords about rejoining the FC and being able to claim the property - as the 30 day check seems to be done when you place the bid, not when you collect. And while a highly reputable person says it, they are also unsure. I've not seen a reputable confirmation of this yet.