質問よろしいでしょうか?
Spotifyにグローバルショートカットを送るスクリプトです
これだと最小化している時は反応しません どう修正すればよいでしょうか?

getSpotifyHwnd() {
WinGet, spotifyHwnd, ID, ahk_exe spotify.exe
Return spotifyHwnd
}
spotifyKey(key) {
spotifyHwnd := getSpotifyHwnd()
ControlFocus, Chrome_RenderWidgetHostHWND1, ahk_id %spotifyHwnd%
ControlSend, , %key%, ahk_id %spotifyHwnd%
Return
}

Pause::
{
spotifyKey("!+{B}")
Return
}