A work around this is to consolidate rock and ground into one type, Earth. Then you would eliminate the 4x weakness. Flying would still have it's immunity against Earth. "Rock moves" would still exist, have the Earth typing but, still be effective against flying, bug, ice, etc. Think of freeze-dry and flying press move mechanics.
Yeah, was thinking of something like that myself. The part where you mentioned about making the rock based earth attacks being coded to hit flyers could work too.
Hell, maybe even make it like an Earth type but only moves like Earthquake and Bulldoze and the like cannot hit flyers. Because like the above post stated, I can’t see the logic of Mud shot or any bone attack not being able to hit a flying target, because you are basically using a projectile, which should definitely hit someone regardless if they are floating.