Hello Norsevidur, and welcome on the forum!
Slots exist to manage the draw order in Spine, but their visibility only affects the editor. You can click on the little key that appears next to a slot in Animate mode to key the visibility of an attachment inside it, you can do the same by clicking on the visibility dot of the attachment with Auto key
active in the Dopesheet.
You'll notice this because when you click on the key or that dot, an "Attach" timeline for the attachment is created, as well as the respective key.
When you click on the visibility dot of the slot, however, no keys will be created, and if you open the Preview
view, you'll see that the slots you decided to hide will all be visible, just as they will once exported.