I've changed the desktop environment to the old unity 7 (the new one runs very slow) , but when I resize the virtualbox window size or changing the resolution from ubuntu settings, it crashes, and then I'm logged out without any warning. All my works was terminated and lost! This is so annoying !
How could I fix this problem? Thanks.

https://ubuntuforums.org/showthread.php?t=1690419
and this method didn't work at all for me...