I’m using keyboard shortcut for screen lock (Super+L) in Gnome 41.2 and then my workspace closes and goes to logout. If I use the system tray lock screen shortcut from the topbar, this function works fine. Could it be some kind of bug?

That way it works fine
My inxi output:
System:
Kernel: 5.15.12-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 Desktop: GNOME 41.2
Distro: Manjaro Linux base: Arch Linux
Machine:
Type: Desktop System: Gigabyte product: AB350M-Gaming 3 v: N/A serial: <superuser required>
Mobo: Gigabyte model: AB350M-Gaming 3-CF serial: <superuser required>
UEFI: American Megatrends LLC. v: F51d date: 12/13/2021
CPU:
Info: quad core model: AMD Ryzen 5 2400G with Radeon Vega Graphics bits: 64 type: MT MCP
arch: Zen rev: 0 cache: L1: 384 KiB L2: 2 MiB L3: 4 MiB
Speed (MHz): avg: 1663 high: 2907 min/max: 1600/3600 boost: enabled cores: 1: 2907 2: 1532
3: 1360 4: 1409 5: 1833 6: 1508 7: 1353 8: 1408 bogomips: 57514
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Oland XT [Radeon HD 8670 / R5 340X OEM / R7 250/350/350X OEM]
vendor: Hightech Information System driver: radeon v: kernel bus-ID: 01:00.0
Display: wayland server: X.org 1.21.1.2 compositor: gnome-shell driver: loaded: ati,radeon
unloaded: modesetting resolution: <missing: xdpyinfo>
Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
Device-1: AMD Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series]
vendor: Hightech Information System driver: snd_hda_intel v: kernel bus-ID: 01:00.1
Device-2: AMD Family 17h HD Audio vendor: Gigabyte driver: snd_hda_intel v: kernel
bus-ID: 07:00.6
Device-3: Generalplus USB Audio Device type: USB driver: hid-generic,snd-usb-audio,usbhid
bus-ID: 5-1:2
Sound Server-1: ALSA v: k5.15.12-1-MANJARO running: yes
Sound Server-2: JACK v: 1.9.19 running: no
Sound Server-3: PulseAudio v: 15.0 running: yes
Sound Server-4: PipeWire v: 0.3.42 running: yes
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Gigabyte driver: r8169
v: kernel port: e000 bus-ID: 04:00.0
IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
Local Storage: total: 2.13 TiB used: 84.64 GiB (3.9%)
ID-1: /dev/sda vendor: Western Digital model: WD10EZEX-75WN4A0 size: 931.51 GiB
ID-2: /dev/sdb vendor: Western Digital model: WD10EZEX-00BN5A0 size: 931.51 GiB
ID-3: /dev/sdc vendor: Western Digital model: WD3200AAJS-00L7A0 size: 298.09 GiB
ID-4: /dev/sdd type: USB vendor: Kingston model: DataTraveler 2.0 size: 1.89 GiB
ID-5: /dev/sde type: USB vendor: SanDisk model: Cruzer Blade size: 14.91 GiB
Partition:
ID-1: / size: 435.39 GiB used: 84.61 GiB (19.4%) fs: ext4 dev: /dev/sda5
ID-2: /boot/efi size: 299.4 MiB used: 288 KiB (0.1%) fs: vfat dev: /dev/sda4
Swap:
ID-1: swap-1 type: file size: 8 GiB used: 0 KiB (0.0%) file: /swapfile
Sensors:
System Temperatures: cpu: 16.8 C mobo: N/A gpu: radeon temp: 33.0 C
Fan Speeds (RPM): N/A
Info:
Processes: 340 Uptime: 4m Memory: 15.61 GiB used: 3.92 GiB (25.1%) Init: systemd Compilers:
gcc: 11.1.0 Packages: 1270 Client: gnome-shell v: 41.2 inxi: 3.3.11
Thanks a lot!