The government is warning the Environmental Defenders Office it risks losing its funding after a series of high-profile court cases against a major gas producer.