Yes I agree, it is towards the end, He asked the Father to Glorify the Son.
He accomplished what he was send to do which was to bring Glory to His Name
He has finished the work He was sent to do.
He sanctifies Himself (make Holy) so that those who believe will be Holy
Jesus said, You (God) are in Me and I am in You.
Jesus needed God the Father to accomplish all the Work. He could not do it by Himself.
*when He was crucified He was separated from God when He took on Him all the sins of the world until He was resurrected and at the right hand of the Father
John 17
“Father, the hour has come. Glorify your Son, that your Son may glorify you. 2 For you granted him authority over all people that he might give eternal life to all those you have given him. 3 Now this is eternal life: that they know you, the only true God, and Jesus Christ, whom you have sent. 4 I have brought you glory on earth by finishing the work you gave me to do.
8 For I gave them the words you gave me and they accepted them.
9 I pray for them, I am not praying for the world, but for those you have given me, for they are yours.
19 For them I sanctify myself, that they too may be truly sanctified.
20 “My prayer is not for them alone. I pray also for those who will believe in me through their message, 21 that all of them may be one, Father, just as you are in me and I am in you. May they also be in us so that the world may believe that you have sent me.
Note * He does not pray for the world, only for those (then and now) who will believe through the gospel, who have been given to Him, Jesus.