As you can see
I want to somehow remove the dotted lines after the button has been clicke
Despite my comment on your question,
You should keep them for accessibility.
You can find your CSS-trick here for this
(Anyway, you should keep them.)