A device can't reach multiple maximum ratings at the same time, and ratings have their conditions.
This question is at Arduino hobbyst level, copy&paste, magic happens.
I guess it's your first steps in design so pretty understandable, there's a vast land out there!
It's the Pmax and Tjmax what limits the operation area.
A typical regulator won't be able to cope with more than 0.5-1W just naked, it will overheat.
If you're able to keep it chill with a proper cooling method, you still have to take care of Pmax, the heat the package can transfer to the outside world is not infinite, past this it will overheat internally, even if you attach it to the Eiffel tower during freezing winter.