This is a driver issue and not a Sway issue.
Ruled out sway by switching to nouveau drivers:
GPU0:
apiVersion = 1.3.311
driverVersion = 25.1.6
vendorID = 0x10de
deviceID = 0x1c82
deviceType = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
deviceName = NVIDIA GeForce GTX 1050 Ti (NVK GP107)
driverID = DRIVER_ID_MESA_NVK
driverName = NVK
driverInfo = Mesa 25.1.6-arch1.1
conformanceVersion = 1.4.1.3
deviceUUID = 3701de10-821c-0000-0100-000100000000
driverUUID = e5191830-0fe3-e436-ea8a-b9ba1a00fb48
vkcube runs without issue on Sway with Nouveau + Mesa NVK.
• GDB Backtrace
• nvidia-bug-report.log.gz
EDIT: vkcube also crashes with the same backtrace on Weston
Message: Process 25037 (vkcube) of user 1000 dumped core.
Stack trace of thread 25037:
#0 0x00007f8a5838a5bf n/a (libnvidia-eglcore.so.575.64.05 + 0x58a5bf)
#1 0x00007f8a5838aac5 n/a (libnvidia-eglcore.so.575.64.05 + 0x58aac5)
#2 0x00007f8a5838ab77 n/a (libnvidia-eglcore.so.575.64.05 + 0x58ab77)
#3 0x00007f8a58a964cc n/a (libnvidia-eglcore.so.575.64.05 + 0xc964cc)
#4 0x00007f8a58b35df4 n/a (libnvidia-eglcore.so.575.64.05 + 0xd35df4)
#5 0x00007f8a58b38496 n/a (libnvidia-eglcore.so.575.64.05 + 0xd38496)
#6 0x0000564edb4a9ee3 n/a (/usr/bin/vkcube + 0x5ee3)
#7 0x0000564edb4acbbb n/a (/usr/bin/vkcube + 0x8bbb)
#8 0x0000564edb4a7c01 n/a (/usr/bin/vkcube + 0x3c01)
#9 0x00007f8a60f366b5 n/a (libc.so.6 + 0x276b5)
#10 0x00007f8a60f36769 __libc_start_main (libc.so.6 + 0x27769)
#11 0x0000564edb4a7fa5 n/a (/usr/bin/vkcube + 0x3fa5)