Why? Foaming it in empty will keep the tank from being distorted when it is full. Better for the tank, especially as removal will be difficult.
I would leave the top open, one reason being to get at the gauge sender and clean out port if it has one. You don't want it to move but you will need access to the top someday.