Custom Scope Activity with impersonation

Hi
I’m trying to create a custom scope activity where everything inside is executed in an impersonated context using WindowsIdentity with a token created by the unmanaged function ‘LogonUser’ from advapi32.dll. Generally the impersonation works but if i use it in my custom activity it doesn’t. I leave impersonation in the Cleanup-Method and it seems like the ExecuteAsync-Method is executed after that Cleanup-Method so the user context is the same as before impersonation.
Do I miss some trick or something?

Please help!
Regards Andreas