Hmm…I’m not personally familiar with NixOS, but some folks using it have reported strange Task Manager issues going away by switching away from the unstable channel (475896 – Wayland: Task Manager does not track open windows) or by other steps to re-align where Plasma is expecting files to be with how Nix manages them (Plasma 6.1.3: Pinned kde application icons go blank after GC(NixOS)). Are either of those applicable for you?
Just to check, does the same issue occur with the Icons-and-Text Task Manager? Does Alt-Tab still work correctly?