Then they took away the stone [from the place] where the dead man was lying. And Jesus lifted up [His] eyes and said, “Father, I thank You that You have heard Me. John 11:41(NKJV)
When someone says thank you it is in response to something already done or given to them.
Jesus said thank you to the Father before there was any physical visible sign that His prayer was answered. Jesus didn’t live and walk by sight or the senses but by Faith. He had a relationship and fellowship with the Father based on what the Father had already assured Him in the Word.
You can always give thanks and expect desired results at all times in all things knowing and assured that the Father is always with you, for you, and that He already has a plan set out concerning whatever issue or problem is before you.