After gastric bypass surgery, I have to follow a certain way of eating throughout the day. Will I be forgiven if I don’t fast and I pay the dues? Or was gastric bypass not allowed?

Yes it’s perfectly fine. No problem at all.