Will a slightly different compact spare tire size work okay?

Off hand I can think of two issues. The tyre for the 6 cylinder model may be larger than yours to support the additional weight/performance and it may not fit in the space allotted in your trunk. Of course there may well be problems I did not think of.

… Oh here is another possible issue You tried it on your car, maybe the back, but there may be a problem on the front (or the other way around) Maybe you could ask the dealer.