They made the exception: “Except that he would not perform the obligatory prayer upon it.” This indicates that, had they not made this exception, the obligatory prayer would have been like the voluntary prayer, performed on a riding mount.
Moreover, Allah says: “So turn your face toward al-Masjid al-Haram.” [al-Baqarah 2:149] Its direction means its side, and this includes facing the entire Ka'bah or a part of it, as the sunnah explained through the Prophet’s ﷺ prayer inside the Ka'bah (1).
Thus, the correct view on this issue is that prayer inside the Ka'bah is valid, whether obligatory or voluntary.
If someone were to ask: “How can we pray inside the Ka'bah?”
The answer is that this is neither rationally nor physically impossible: a person may have the door of the Ka'bah opened for him and pray within it. If it is not possible for the door to be opened for him, then the Hijr—with an i vowel—is open; and six cubits or so of the Hijr are part of the Ka'bah (2). Thus, it is possible for a person to perform an obligatory prayer in the Hijr.
A voluntary prayer is valid by facing an upright part of it
His statement, “A voluntary prayer is valid by facing an upright part of it,” means that a voluntary prayer inside the Ka'bah is valid when one faces an upright part of it. That is, there must be something upright before him, even in a voluntary prayer. An upright object is something standing.