I have two Citrix environments which are pretty much identical. Both 2019 Citrix LTSR 1912 CU4. One has the issue the other one doesn't and profiles get cleaned up nicely. They both run 2105 HF1 and share the same redirections.xml file and container storage location.
On the not working I get these errors:
[14:57:43.138][tid:00001770.0000407c][WARN: 00000091] Failed to delete C:\Users\local_BURNESKA (The directory is not empty.)
[14:57:43.142][tid:00001770.0000407c][WARN: 00000005] Failed to delete C:\Users\local_cvetanom (Access is denied.)
The VHDX gets unmounted though, so the user can still re-logon. It just doesn't delete the temporary local_data.
When I try to delete the content from local_user myself I get an access denied. I tried spawning a CMD as SYSTEM but same thing, access denied. There is no way you can delete that folder. I'm running non-persistent disks though, so reboot and it's gone but it's still annoying enough.
My other Citrix env has no issues at all, it can run for weeks and all profiles are cleaned up perfectly fine! So wth is the difference :)