We already lose tax revenue when companies profits go do. I don't see what the problem is. In this scenario the government would hold a wide portfolio of stock (every publicly traded company) and so should be insulated from individual variations except in the case of a major downturn, which effects government revenue already.
and also lose money when those public companies lose value?