Many vending machines (e.g., the ones where I work) won’t accept the dollar coins.
All the latest and greatest (and most secure) vending machines use acceptance devices that are able to validate that only US coinage of the prescribed value is used.
If your machines are owned by an employee benefit association, which is very typical when the sole purpose is potato chips and candy, you now know why you lose money on it.
And yet the stamps vending machine I used at the post office did give them back as change.