Thanks to FredFoo's comment for getting me on the right track, and the post at How to let screen time out on sign in screen, I was able to figure out that the user for the login screen is lightdm.
Run this to find all of the lightdm user's power settings:
sudo -H -u lightdm dbus-launch --exit-with-session gsettings list-recursively org.gnome.settings-daemon.plugins.power
Then run this similar command to see the current user's power settings:
gsettings list-recursively org.gnome.settings-daemon.plugins.power
Based on the above I was able to figure out that the setting I needed was sleep-inactive-ac-timeout, which was set to 0 for the lightdm user but was set to 300 for my personal user.
Then I ran:
sudo -H -u lightdm dbus-launch --exit-with-session gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 300
to set the same timeout, restarted, and everything is now working as expected.