Article II states: “The electors shall meet in their respective states, and vote by ballot for two persons, of whom one at least shall not be an inhabitant of the same state with themselves.”
That doesn’t prohibit a president and vice president from running in the same ticket. Just the electors from voting for both of them.
As I said, bad politics but not prohibited.