Programmatically set "always hide the sidebar" setting

I have a problem removing the sidebar. I’m developing a HA app that will run on my Fire TV cube. HA will be running in a floating overlay, using a webview. The problem is that this view of HA will be read only - it won’t be possible to interact with the window.

I’ve used both wallpanel and kiosk mode integrations to remove the side bar but because of the way I think the integrations work, the side bar is very briefly shown before it is removed by either integration.

I’ve tried:

http://192.168.1.73:8123/dashboard-studyonly?external_auth=1&wp_enabled=true&hide_sidebar=true

and, in the lovelace dashboard:

wallpanel:
  enabled: true
  hide_sidebar: true

The option in “profile” called “always hide the sidebar” will remove the sidebar permanently (per device) but because I can’t interact with the webview on my app, I have no way of setting it in that menu option.

Is there another way to disable the sidebar which disables it without it first been drawn? Can it be set in yaml, executed by script, etc?

sidebar-2024-03-16_15.32.13