How to use a SSD partition as a Windows 11 bootable installation media?

My problem (TLDR)

I want to use a single SSD as a Windows 11 bootable installation media (on partition 0) as well as the main drive for the Windows 11 OS itself (on partition 1). I have done this successfully multiple times on Windows 10 (with legacy BIOS), but I am unable to do it in the same way on Windows 11. I am able to boot the installation media (partition 0), but I am unable to use the partition 1 during the Win11 installation. Has anyone been able to make this work on Windows 11 or can anyone help my in any other way please?

My problem (detailed)

I have a single SSD disk in my new PC01 without any OS. On a separate PC (PC02), I want to create a small partition (10 GB) in this SSD and set it up as a bootable installation media for Windows 11. Then, on PC01, I want use the installation partition for the installation of Win11, and I want to install the Win11 on the remaining portion of the SSD. Is this possible in Win11? And if yes, can you point me to some guide please? The way I used in Win10 (with legacy BIOS) does not work for me in Win11.

How I have done it previously on Win10 (with legacy BIOS)

https://gist.github.com/howa003/119d4a8b056b8ac49ca3f4fe7b633cb6

Similar problems/questions

How to write a bootable ISO Windows installation disk to a disk partition (and not USB flash drive)?

Create Windows installation media in a disk partition of internal second hard drive. (like bootable usb with rufus)