Sentence 2 is correct and follows the standard "sequence of tenses" convention. However, there are two reasons that might explain sentences 1 and 3:
Sentences 1 and 3 could be justified if you considered "was" to be relative to the present time and not to the time described with the past perfect tense.
Many English speakers and writers don't adhere closely to the "sequence of tenses" convention, so it is common to see the simple past tense even when it describes an event that occured before an event described by a verb in the past perfect.
For example:
Ms. James’s report forced the state’s health department to make public more than 3,800 previously unreported deaths of residents who died outside a facility, like in a hospital, and had not been included in the state’s official nursing home tally. (Jesse McKinley and Luis Ferré-Sadurní, "New Allegations of Cover-Up by Cuomo Over Nursing Home Virus Toll," New York Times, 12 February 2021)
The verb "died" clearly describes an event that happened before the event described by the verb phrase "had not been included". Even though most textbooks would have you write "had died", sentences like this one (and your sentences 1 and 3) are very common in written and spoken English.