Bags intended for produce are often made of a mesh too coarse to contain granules of rice. Others have a weak drawstring closure that fails to resist a couple pounds of rice pressing against it when the bag gets tossed around. My solution to this problem is to use roll-top dry bags when I’m buying rice from the bulk bins. I’m partial to Sea to Summit Ultra-Sil Dry Sacks. At home I store these with my other grocery bags, so that I don’t have to remember to dig them out of my backpacking gear before heading to the market.
The cashiers are always impressed with my bags.