Gas flex hose is not designed to be used underground, and it can be damaged by the weight of the soil and water. This could lead to a gas leak, which could be dangerous and even fatal.
If you need to run a gas line underground, you should use a rigid pipe that is specifically designed for this purpose.