Are you using different keys? Sometimes the key(s) / car go out of sync - shouldn't happen that much, but it happens now and then with all of my E39's over the years - locking and unlocking with the key again resets it.

If the starter spins it isn't the immobiliser, as that is what the immobiliser inhibits.