His mood was a factor, but there were other factors as well. His treatment by Paul McCartney, for instance, was another factor. Paul often brushed off George. That is well known. He never treated George's music with the consideration it deserved. Then going beyond the Sgt' Pepper album there are other things to consider. Even as a John Lennon fan, I considered "While My Guitar Gently Weeps" as the best song on the White Album. And on Abbey Road certainly Something and Here Comes the Sun are two of the best songs on the album. Beyond that, there are George Harrison's solo albums, especially the early ones which are very good.
As for George's mood during Sgt. Pepper, he was entering a deep involvement in spiritual things which lasted with him all his life. It was real and it was more important than the music itself. The spiritual meaning, for instance, in the Living in the Material World album had an impact on me which has lasted to the present, despite having first listened to it many years ago. A book which especially goes into things like this in great detail is "The Love There That's Sleeping: The Art and Spiritually of George Harrison." by Dale Allison. It was very hard to find for a while, but appears to be widely available now. The author doesn't agree with all the spiritual aspects of what Harrison believed. Neither do I. But I think he does an excellent job of analyzing him as a person. What his priorities really were in life and that sort of thing.
I haven't listened to the new Sgt. Pepper release. I do know, however, that I do best when writing songs with other people if I feel they are open and receptive to me. When I feel especially what I consider unnecessary criticism, it slows down my creativity.
There were times when George came into the studio when Paul didn't even want George to open up his guitar case until he was ready for George to start playing on a song he was working on. In other cases, Paul even had some of George's guitar parts removed. Paul had the right to do this. But I doubt if it created very much of a positive atmosphere. As far as I know, John Lennon never did any things like this with George. I'm not a Beatles aficionado as much as a Hendrix aficionado. I haven't read everything there is to read about them. But I think I have an accurate overall perception of the main points.
As this article points out, "Within You Without You" was hardly even a Beatles song at all. It also alludes to some of the things I've mentioned. From the article:
“Within You Without You” is the sound of Harrison’s first steps toward a solo career, one marked by a lengthy pursuit of spiritual awareness."
George Harrison Gets Deep on 'Within You Without You': The Story Behind Every ‘Sgt. Pepper’ Song