If dairy is causing a lot of gas, you are probably lactose intolerant, along with the majority of the world's adult population. You might be able to deal with it by taking a Lactaid (lactase enzyme) pill with your dairy, but I find that doesn't do enough for me to be able to tolerate dairy. Using soy milk instead of cow milk for your recovery drink would work (unless you have a problem with soy also). Rice milk is pretty low in protein, so that probably wouldn't be a good alternative. Almond milk and oat milk are higher in protein than rice, and I think they taste pretty good.
Does the Powerbar contain a lot of fiber? You might need to work up to eating a whole one if it does. You probably won't totally eliminate the extra gas, but it will make it less painful if you build up your fiber intake. My other thought is that the Powerbar might contain either soy protein or a dairy product that has lactose in it. I know a few people who are sensitive to soy and get gassy when they eat it. So you could switch to a non-soy, non-dairy bar, of which there are limited options. I am a big fan of ClifNectar bars, which are just fruit and nuts and very filling. I also eat a lot of fresh fruit as snacks (if you have a problem with the fiber, you'll have to build up to that).