side cover

The engine case looks basically the same, and the same right side cover gasket (Yamaha part 1L9-15451-10-00) is used for the 1978 XS400-2E and the 1981 XS400H/SH. I'd think there is very little risk that it wouldn't work.
I would stick with the center stand and dip stick. A much more accurate reading for the oil. I had four bikes with the site glass and dipsticks in them and all showed a different level in the glass, even tho all had the same level on the stick.