This could be possible because edit mode contains extra DOM element to support editing and your UI code may be impacted by those although you can add extra classes in WCM edit mode and with the help of extra classes you can handle it.
<div data-sly-test.author="${wcmmode.edit || wcmmode.design}" data-sly-unwrap></div>
<div class="row ${author ? author_row : '' }">
//
//
</div>
Arun Patidar