It seems like a recent update (not sure which version) changed the way Anki runs, so that Logitech Gaming Software does not recognize Anki running and switch profiles.
Task Manager says that Anki runs via the regular anki.exe, but I found that the reason is because instead of the anki.exe file, the file that Windows considers as Anki is now “…\AppData\Local\AnkiProgramFiles\python\cpython-3.13.5-windows-x86_64-none\pythonw.exe”
This seems like an oversight that will cause issues for other software that relies on the anki executable to recognize when Anki is running or is in the foreground.