Hi mãe solteira and Welcome to the Forums! It does appear that you're bugged as Animals shouldn't be outside when it rains unless they were stuck outside the night before with closed Coop and Barn doors.
One very annoying Animal behavior which happens on occasion is they either fall asleep or get stuck outside after dark and if you stay on your Farm, they will stay outside. Which is bad if you want to close your Barn and Coop doors if it's going to be raining the following day.
Easy solution: Leave the Farm (enter Farmhouse/Shed or exit to Bus Stop or Cindersap), wait a game time tick (8:20pm --> 8:30pm for example) and then return. Everyone has now got themselves unstuck and teleported inside their Coop or Barn no matter how far away they were. Stardew Farm magic, no Junimos or correspondence-school Wizards needed!
I never close my Coop or Barn doors any more as it doesn't seem to make much of a difference to the Animals' moods as long as I pet them every other day or so. But I know they will always be able to get back in for the night. To keep them fed, plant about 20-30 evenly spaced Grass Starters on Winter 28 and watch the Spring 1 Grass EXPLOSION cover your Farm with happy Animal Grass. Make that grass patch big enough and they'll have enough for every day of the next 3 seasons. If you have a Silo or three, thin it out every 3-4 days with your Scythe as you're passing by and cut all the rest on Fall 28 with the Golden Scythe and you're ready for Winter and have some during the year for rainy days. You'll never be out of cheap and easy Animal food, and all with minimal effort which is the real 100% perfection goal of this game.
That other 100% Perfection thing is only for Farmers who just insist on putting too much effort in despite all the time-saving conveniences added to the game to make your life easier. It's OK, some people just don't take the lazy ah... efficiency hints and anyone can play the way they want.