Yes, its true that Jesus says whatever ask in my name i will give you,
And I will do whatever you ask in my name, so that the Father may be glorified in the Son.
I think we should not take literal meaning that word “whatever”, the scriptures are well connected…in another scripture it says
1 John 5:14-15 New Living Translation (NLT)
And we are confident that he hears us whenever we ask for anything that pleases him. 15 And since we know he hears us when we make our requests, we also know that he will give us what we ask for.
So the prayer must follow the will of God.