With spider jockeys, the skeleton's model rests inside of the spider's chest rather than on top of it. There still seems to be open room above the skeleton (as seen in the second image) to move the skeleton higher without making the mob combo go above 2 blocks tall.
If possible, the skeleton should be riding on top of the spider.
This behavior is present in 1.17.1 as well and isn't exclusive to the 1.18 snapshots.