Government never gets anything from a simple quota. Consumers lose the green plus purple plus light blue plus dark blue areas Government gains nothing.
Domestic producers gain the green area.
The green area just passes from consumers to domestic producers, but is not lost by the nation. The light blue area passes from consumers to foreign producers, and is lost by the nation. The purple and dark blue areas are lost by consumers and not gained by anyone else, and there are no other gains anywhere else. Hence there is a net national loss, larger than in the tariff case.