Heaven After Getting Punishment
The single most important thing in matters like these is that Allah has repeatedly told us that He will decide everyone’s fate with utmost justice and there will be complete fairness. Hence, we should trust that His judgment would be fair. The punishments are given according to the magnitude of the crime , and for the sins which do not entail the punishment of eternal hell, there will be punishment according to the magnitude of the crime. If one has received their due punishment, and regret their crime/sin and ask for forgiveness afterwards, it is hoped that Allah will forgive them. Allah is the most knowing.