One should not confuse grammar with semantics. Grammatically, the two uses of we are the same.
I am assuming that in both uses you have in mind, it is not acceptable to precede the we by an article (unlike what I have just done). Otherwise, it's a different story. For example, consider the sentence We are a 'we'. In this case, the first we is a pronoun, but the second is a noun (because it is preceded by an article)—a clear difference in grammar.
Motivating example: bank
Consider the situation with the word bank. That word has two quite different meanings: bank1 is a financial institution, and bank2 is sloping land on the side of a river. But despite the lexical difference, bank1 and bank2 are indistinguishable as far as their grammatical properties. Grammatically, both bank1 and bank2 are countable nouns, with the plural banks. They can both be the subject of the sentence (A bank recently collapsed), the object of a verb (We will demolish that bank), a predictive complement (That is a bank), the head of a complicated noun phrase (even all the old banks in Italy that still exist), etc.
There is a possibility that one might detect a difference in how the two banks interact with other words, e.g. prepositions. For example, for all I know, there could be some prepositions that are licensed by bank1, but not bank2 (or vice-versa). However, I am not aware of any such difference. For example, I'm going to the bank is grammatical regardless of whether the bank in question is bank1 or bank2. Even he's in the bank is grammatical for both (though it is much more likely to be used with bank1).
The situation with we1 (each individual member of the group) and we2 (a group in its entirety) is similar.
Both we1 and we2 disallow determiners, which is a distinguishing characteristic of pronouns. Both we1 and we2 have the same inflectional forms: us (accusative), our (dependent genitive), ours (independent genitive), and ourselves (reflexive). In the nominative, they can both be subjects of a sentence; in the accusative, they can be objects; and so on and so on.
More generally, I don't know of any constructions that are grammatical with we1 but not we2, or vice versa.
The difference between we1 from we2 is thus not grammatical, but lexical. It should be recorded not in grammar books, but in dictionaries. Unfortunately, as best as I can tell, dictionaries only record we1. And why that might be the case is certainly an interesting question, which I currently have no idea how to answer.
We as a noun in the OED
The following entry in OED at first seems to cover we2, but the annotation n. shows that this we is a noun, which is confirmed by the fact that this we takes an article in the sample sentence:
b. A couple or group identified to its members by the word ‘we’; two or more people forming a unit.
1979 E. Hardwick Sleepless Nights v. 61 I am alone here in New York, no longer a we.