In an ASIL Insight entitled "The Australian Trade Policy Statement on Investor-State Dispute Settlement," Jürgen Kurtz writes:
States can protect domestic policy space in an investment treaty by clearly delineating the outer limits of substantive obligations and/or crafting exceptions for state conduct. For instance, the investment chapter of an Australian FTA could include exceptions modeled on the carve-outs in WTO law for, inter alia, public health and environmental regulation.
With regard to policy space, should there be a general exception to all investment treaty provisions along the lines of: "Except in rare circumstances, non-discriminatory regulatory actions by a Party that are designed and applied to protect legitimate public welfare objectives, such as public health, safety, and the environment, do not constitute violations of this agreement." I don't have all the details here, but provisions of this sort have been included to a limited extent in some agreements, in particular in the context of indirect expropriation. But perhaps it could apply as an exception to all provisions?