I think I may see what is going on here. So I modified your test scrip and it is actually working for me thus far. I can set dogs to any value I like and when I return from the screen dogs displays with the correct value. This value also persists through saves as expected. Below is the script I used for testing and for reference I used renpy 220.127.116.116 for testing.
dogs = 5
action SetVariable("dogs", dogs + 1)
action SetVariable("dogs", dogs - 1)
while True: #simply to keep the screen called for testing purposes
call screen test
So as far as I can tell the value updates correctly during run time, but I did notice something that I think is the issue you are dealing with. If I was to set the value from 10 to say 20 and saved the game without returning from the screen, if I reloaded the game the value would be reset to 10. So this shifts the question to not why is the value not changing to why is renpy not saving the value on the screen and that is due to how renpy handles saving data.
Now a quick note, I think its been about a year since I deep dived into renpy’s code so take what I say with a grain of salt.
The way renpy saves data is not by saving the current game state, instead renpy saves “snapshots” of the game and the snapshots are not snapshots of the games full state but instead a collection of what values changed since the last call in the script. When renpy loads a save file, on a basic level, it actually replays the game for you from the start to where you saved to bring you back to your saved game state.
This is a very cleaver system and this is how renpy can allow you to look over your game history when you load a save or backtrack from your current point if that is enabled as it basically pops the changes off of a stack. As a quick side note this also means renpy likes its games to be deterministic.
Now what I think is going on is screens do not cause a new snapshot to be formed until they return. This makes a lot of sense in order to keep the amount of data that would need to be saved down, and I think that is what you are seeing. That or you are using a different version then me that may have a bug.