Also, the first thing to determine is if it's really an issue at startup (ie xfwm4 is listed in the session for next restart) or if it's with the logout, ie xfwm4 is removed from the session and therefore is not restarted later.
So when that happen, first thing is to check if xfwm4 is listed in your session in ~/.cache/sessions/xfce4-session-<display>
Also, the first thing to determine is if it's really an issue at startup (ie xfwm4 is listed in the session for next restart) or if it's with the logout, ie xfwm4 is removed from the session and therefore is not restarted later.
So when that happen, first thing is to check if xfwm4 is listed in your session in ~/.cache/ sessions/ xfce4-session- <display>