Proof that class of languages accepted by DPDA by empty stack is not closed under union
Indeed, the requirement that the DPDA accepts by empty stack has some &quot;severe&quot; consequences.
Under the standard definitions, an automaton with empty stack is blocked from further computations, as normally one would pop a stack single symbol at each computational step. As a consequence DPDA languages by empty stack are prefix-free: if the accepted language contains a string $x$ then it will not contain any string $xy$ with $y\neq \varepsilon$.
Now the language $\{a,aa\}$ is an easy counterexample.