Example 1. The baby slept soundly. There were loud noises.
Despite the loud noises, the baby slept soundly.
In spite of the loud noises, the baby slept soundly.
The surprising result is that “the baby slept soundly”, so it should come after “Despite” or “In spite of”!