Shadow dom element access issues

Hi Team,
In How I can access multilevel dom elements present under shadow root? In Katlone while creating test script.

I tried
const shadow = elem.shadowRoot;
const childNodes = Array.from(shadow.childNodes);
but it is not giving any result.

Please suggest on this. What is the best approach to access the dom elements?