It’s complicated.
See U.S. Const., art. II, § 1.
https://www.law.cornell.edu/constitution/articleii
“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.”
Although the running mates could technically be from the same state, the electors from that state could only vote for one of them in that instance.
This could trigger a situation where the President came from one party but the Vice President came from the other party because the electors couldn’t vote for both of them. I doubt either the GOPe or the Democrats would risk that.