It seems like you need to add a wait step in Salesforce
Since marketo is the one both assigning the lead and then adding the lead to a campaign, can the wait step not be implemented in marketo?
You cannot make the campaign attachment to differ as soon as you use program - campaign sync. There are quite few ideas on this, such as this one: Selective Program Member synchronization (by member status)
In the mean time, you should delay the task creation by a few minutes. Since it's in SFDC, you just need to make your workflow a Time base workflow.
Generally we always have a wait step FIRST or immediately after a sync to let SFDC catch up before using Lead Owner or re-assignment.
Update marketo stuff
Sync to SFDC
Wait 15 min
Do more stuff based on SFDC values.