Just would like to know if we could write "What had happened while we were away" . I think past perfect is not obligatory in time clause.
You are correct, "were away" will do. Apart from being understood, there are some nuances.
The story is about what they found when they returned from vacation, that is, what had happened while they were away. They found that a burglar had been there and had stolen some of their possessions..
You might want to continue the past perfect: the burglar had gotten in through the window. He had had no difficulty forcing it open. But that's not necessary, although if you shift to simple past: the burglar got in.... you're no longer looking back in time at what you discovered when you returned, you're telling a slightly different story, how the forced entry took place.
Historical present can be substituted for the past to give greater immediacy to the story. The past tense can be substituted for the past perfect to the same end.