Scenario screenshot: If you have custom harness to load a new UI page or harness, and wanted collapse the left panel then run the below OOTB script as show in the below image.
function name : “pega.u.d.skipToContent”
Parameter : contentType=“main”