Thanks for using Astroid Framework, I understand what issue you are facing of, But this is how a menu should be work, The logic is, a submenu will always be appear in the right, if it doesn't have space in right than it will be appear to the left. Here we are with two solutions.
#1. You can add some box-shadow or border to the submenu so that it will visually not look like overlapped.
#2. If you still strictly wants to always open the submenu in the right side than you can add below css.
JoomDev is not affiliated with or endorsed by Open Source Matters or the Joomla! Project. The Joomla! logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.