Obama maintained his Senate seat while he campaigned for President.
Each State has their own rules.
KY, until recently did not allow a U.S. Senator to hold his senate seat and run for President too.
Those rules were recently changed.