VfB Stuttgart have climbed out of the relegation zone after Borna Sosa's thumping second-half finish gave them a much-needed home win over Mainz on Friday.