Leonardo not recognised

I'm working on my second pcb project with the 32u4 microcontroller (ie. the Leonardo). Now I've hit this issue where I can load the bootloader succesfully, but not my program.

In devices, the Leonardo shows for a few seconds and then disappears.
I don't think it's a driver issue since my other Leonardos connect without problem.

I'm aware of (and have tried) the following:

  • keeping reset pressed while code is compiling and release it during the actual loading.

  • I rebuild my pcb 3 times now, I'm pretty sure bad soldering is not the issue.

  • I ordered the project a second time from the pcb-printer.

  • I've just rebuild my previous project again and that one is loading succesfully.

  • I'm trying on a minimum viable board:

  • data lines are connected to pin 3 and 4 with a 22 ohm resistor

  • 16MHz chrystal and two 10pF capacitors

  • 1µF capacitor on pin 6

  • pins for bootloading connected (MISO, MOSI, SCK)

  • reset connected to 5V through 1K, to ground with 100nF and a push button to ground

What else could I try next?

Also, I'm not sure what board to put this thread on. It feels like a bootloading issue, but also like a product issue, since I saw this topic pop up a lot over the years. Feel free to redirect it.