Hello Anjo
The last time I took this train, a VAT of 20% was applied, this is the rate of Austria, but I think that I was already in Germany. It is not false, because I mainly ate between St. Margrethen and Lindau. The VAT rate in Germany is 19%, in Switzerland only 8,1%.
You can/must pay in CHF or EUR. This is not illegal, there is no law setting the price of drinks in dining cars.
I think that the price you paid in CHF is converted to EUR at the current exchange rate and the VAT of 19% is due in Germany. You can verify this on your receipt.
Kind Regards
Danhiel