Blank Window when upgrading to AlmaLinux 8.8

I have update to kernel 4.18.0-477.10.1.el8_8.x86_64 and now all windows are black as shown in the picture.

If I make the account a system account, it works without problems.

cat <<-'EOF' > /var/lib/AccountsService/users/$user
[User]
Language=
XSession=gnome
SystemAccount=true
EOF

I have reverted to kernel 4.18.0-425.3.1.el8.x86_64 and there is no issue.

I managed to get it working by doing the following:

  • Login once and then log out once. A file will be created as /var/lib/AccountsService/users/$user and it’s content is as below
# This file contains defaults for new users. To edit, first
# copy it to /etc/accountsservice/user-templates and make changes
# there

[com.redhat.AccountsServiceUser.System]
id='almalinux'
version-id='8.8'

[User]
Session=gnome
Icon=/home/test/.face
SystemAccount=false

If I modify the file as below and reboot the server, it works.

# This file contains defaults for new users. To edit, first
# copy it to /etc/accountsservice/user-templates and make changes
# there

[com.redhat.AccountsServiceUser.System]
id='almalinux'
version-id='8.8'

[User]
Language=
Session=gnome
SessionType=x11
XSession=gnome
Icon=/home/test/.face 
SystemAccount=false

What do I need to do to get it work without performing all the steps mentioned?