Check the dogs gums. If it’s got a bluish or purplish tinge it could be serious and the dog should see a vet ASAP.
My Sheltie was showing signs once of this when we went to the vets office once when their A.C. was down. The vet was concerned that he might also be stressed and said if when I got home and there was no improvement, his gums weren’t pink again, to contact her again ASAP or take him to animal emergency. But I was able too cool him down with cool wet towels.
But there are other causes than overheating for dogs to pant. It could be pain or gastrointestinal disorder. Reasons to see a vet or animal emergency. Check with your fostering group for the procedure.
If stress due to a new environment, try some calming music and scents. Don’t overwhelm the dog with affection...just give her some space. I tried giving my rescue a calming treat but he seemed to have an adverse reaction to it. It might work for other dogs though.
Good luck. Each dog is different and requires patience and different handling. I would consult with your foster coordinator.