Yes you get less gasoline when it's hot outside because when it's hot outside the gasoline is less dense.
When the weather is cool out or cold out the gasoline is more dense.
But the gasoline amount you get even though it's less is not all that much less to worry about it.
But if you want to get more gasoline then you should pump the gasoline either in the morning or night when it's cooler out.
Myself I never worry about it and just go pump the gasoline when I need the gasoline.
It's a small amount that you lose in gasoline though when you pump gasoline in the hotter weather.