From the documentation, there are 4 types of Javascript / 3rd Party Tag containers.
It sounds like you chose Non-Sequential HTML container type, which appends a DTM hosted iframe to the page, with your code in it. To append your code to the parent page, you must change the tag type to either Sequential HTML, or convert the tag to pure javascript and use Sequential Javascript or Non-Sequential Javascript type.
Side note: make sure to read the document page I provided above to ensure the type you choose is compatible with when you have it set to output (top of page, bottom of page, dom ready, window load)