An adjective is not (normally) preceded by a determiner. Determiners hinge on nouns. This forces me to think there has to be something that we can't see in
They are the same.
Moreover, if 'the same' is an adjective phrase, we can put 'very' in front of it like this and get a grammatical sentence:
They are very the same.
They are the very same.
The fact that we can insert 'very' between 'the' and 'same' gives me the idea that 'the' is not so much attached to 'same' as to something else. Probably a covert noun head is there.
'(T)he same' is not an AdjP. It is a pro-noun-phrase or a noun-phrase whose head is cut off (apparently missing).
Student or Learner