Why there are two body tags in DOM when using Ionic modal?

When after I use Ionic modal to show modal dialogs to user, in dom inspector it shows two “body” tags which causes issues in selenium testing and css styling customizations which we are trying to achieve. is there way to prevent this behavior?