There is no reason why the return type of a function producing a union type can't be erased to its lub.
There is an issue however with supplying widened unions to dotty methods, unless more work is done to the compiler to enforce precision, such as adapting to something precise but is then erased, like scala.js union