Issue related designer card

when we develop a custom card in control designer it show properly in designer preview.

But when we use actually in the app the cards elements take wrong position and style effects.!!
Screenshot from 2020-10-17 13-39-39|690x469

This is what the Designer preview shows
image

While when used in a list repeat, the following is displayed.