An interesting situation you have there. As leesteken points out this would indicate a general Linux incompatibility. However, seeing that your HP Prodesk 400 G7 is an intel 10th Gen issue, which makes it approximately almost 4 years old, its surprising that Googling a search for this issue does not raise any relevant results. It is possible that you have a unique situation where the PCIe controller + your specific NVME have a Linux only problem. That is still very interesting.
The only things I can suggest:
1. Have you entered the BIOS to check for settings that maybe PCIe/NVME related?
2. Is the BIOS updated?
3. Does the drive show up in the BIOS. (I'm going to imagine it does, if Windows Server managed to install on it).
4. Have you tried an alternate NVME (different make/model/size).
5. If you have an NVME to USB adapter around, does it show up in Linux.
6. There is also a possibility, that there is some loose HW connector/connection etc. that is a hit & miss, and is sometimes working.
1. Have you entered the BIOS to check for settings that maybe PCIe/NVME related?
Checked and resetted the BIOS just in case
2. Is the BIOS updated?
This has been checked, according to HP it's up to date
3. Does the drive show up in the BIOS. (I'm going to imagine it does, if Windows Server managed to install on it).
Yes, the driver is visible when entering the BIOS and the boot menu before the OS is loaded
4. Have you tried an alternate NVME (different make/model/size).
Yes, both the NVMe drivers from Samsung an the pre installed from a Lenovo Thinkpad 490 are not visible from the OS (except for Windows)
5. If you have an NVME to USB adapter around, does it show up in Linux.
This is not something i have on-prem
6. There is also a possibility, that there is some loose HW connector/connection etc. that is a hit & miss, and is sometimes working
That's what i think a very rare case and the problems are only pressent when installing or boosting a Linux based OS, when installing en boosting Windows it's imidiatly recognized (Example, Windows 11, Windows Server 2022)
But for some reason, i've seen that is also not visible for Windows Server 2019, Windows 10, Proxmox, Fedora 39. So i think its regarding the drivers at the boot proces of the installation files that are required.