The LM338 should, I believe, be floating & not actually 'know' it's voltage. I believe it'll only have 1.2V across it, and that that's the important thing.
I was supposing 4 transformers in your case, each just providing 230V floating. That can then be rectified, probably with a fat capacitor. The two identical circuits could then be put in series. But I think it needs current limiting, unless the only limiting factor is the inverters own ceiling, assuming it controls that, rather than fusing or blowing up.