They should work in an x4 slot (assuming it fits), but only be running at x4. They should work fine in a x16 slot as well. Heck, I've got a x16 video card that runs in an x8 slot in my server (Dell R710 if you want to look it up) at x8 speeds after cutting a gap in the end of the slot.
well if you look at what gigabyte did, they gave each slot a full length capability https://www.gigabyte.com/us/Motherboard/X399-AORUS-Gaming-7-rev-10#kf But they run at 16, 8, 4, 16, 8 if I recall, the middle one goes through the chipset.
So while it would fit I don’t know if it would run or how much speed loss it would suffer.
I used the 16 and 8 slots, I‘ll only try it if temps are an issue.