The Business Central web services must be used to simultaneously insert headers and lines. However, the lines cannot be entered; only the header can.
I discovered that Deep Inserts can only be performed through the APIs when searching online for information about this issue.
I looked through Microsoft's documentation in an effort to locate a piece of writing or other reference to this, but I was unable to do so. I start to doubt if using the APIs is the only way to do this.
I have come upon some related answer which may help you,
https://www.kauffmann.nl/2020/05/05/deep-insert-with-business-central-apis/