[Google Pixel Fold] ChickenMcPluckU:
I have found that the Pixel Launcher needs to be running in the background / recent apps for the dock to stay open. So pretty much need to launch it every time you unfold.

I created a Tasker profile that does it automatically. Uses the hinge open sensor to launch pixel launcher then reopens the app that was in the foreground prior to unfolding. Barely even notice it happening.

Taskernet Link: https://taskernet.com/shares/?user=...UQ=&id=Profile:Pixel+Launcher+On+Unfold+State

Tasker Profile:

XML: Pixel_Launcher_On_Unfold_State.prf.xml

<TaskerData sr="" dvi="1" tv="6.1.32">
<Profile sr="prof15" ve="2">
<cdate>1688749084909</cdate>
<clp>true</clp>
<edate>1688750053160</edate>
<flags>8</flags>
<id>15</id>
<mid0>7</mid0>
<nme>Pixel Launcher On Unfold State</nme>
<State sr="con0" ve="2">
<code>190</code>
<pin>true</pin>
<Bundle sr="arg0">
<Vals sr="val">
<net.dinglisch.android.tasker.RELEVANT_VARIABLES>&lt;StringArray sr=""&gt;&lt;_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0&gt;%as_accuracy
Accuracy
1 = Low, 2 = Medium, 3 = High&lt;/_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0&gt;&lt;_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1&gt;%as_sensor_type
Sensor Type
Number corresponding to the sensor type. Can be used in the "Sensor Info" action.&lt;/_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1&gt;&lt;_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2&gt;%as_values()
Values
1 = Low, 2 = Medium, 3 = High&lt;/_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2&gt;&lt;/StringArray&gt;</net.dinglisch.android.tasker.RELEVANT_VARIABLES>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">36</Str>
<Int sr="arg2" val="2000"/>
<Int sr="arg3" val="4"/>
<Int sr="arg4" val="0"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%as_values1</lhs>
<op>6</op>
<rhs>90</rhs>
</Condition>
</ConditionList>
</State>
</Profile>
<Task sr="task7">
<cdate>1688224779135</cdate>
<edate>1689017260491</edate>
<id>7</id>
<nme>Fix Pixel Dock on Unfold</nme>
<pri>7</pri>
<Action sr="act0" ve="7">
<code>335</code>
<Bundle sr="arg0">
<Vals sr="val">
<net.dinglisch.android.tasker.RELEVANT_VARIABLES>&lt;StringArray sr=""&gt;&lt;_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0&gt;%app_icon
Icon
Icon for the app&lt;/_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0&gt;&lt;_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1&gt;%app_name
Name
Name of the App&lt;/_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1&gt;&lt;_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2&gt;%app_package
Package
Unique package name for the app&lt;/_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2&gt;&lt;/StringArray&gt;</net.dinglisch.android.tasker.RELEVANT_VARIABLES>
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">last(0)</Str>
<Str sr="arg2" ve="3"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act1" ve="7">
<code>20</code>
<App sr="arg0">
<appClass>com.google.android.apps.nexuslauncher.NexusLauncherActivity</appClass>
<appPkg>com.google.android.apps.nexuslauncher</appPkg>
<label>Pixel Launcher</label>
</App>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act2" ve="7">
<code>20</code>
<App sr="arg0">
<appClass></appClass>
<appPkg>%app_package</appPkg>
<label>%app_package</label>
</App>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
</Task>
</TaskerData>