Bootloop when trying to debug esp32 with custom partitions scheme on arduino framework

I have the same issue but with a 4MB flash size on an AZ Delivery dev board. I only enlarged the app partitions bij 64KB to allow a slightly larger program and added an SPIFFS partition for storage. This is my partition table with the same issue:

# MODIFIED ESP-IDF Partition Table
# Name,   Type,  SubType, Offset,   Size, Flags
nvs,      data,  nvs,     0x9000,     20K,
otadata,  data,  ota,     0xe000,      8K,
app0,     app,   ota_0,   0x10000,  1344K,
app1,     app,   ota_1,   0x160000, 1344K,
spiffs,   data,  spiffs,  0x2B0000, 1344K,

I can confirm with the default partition sizes debugging works fine.