It seems that the problem was with the styled-components version, changing to @5.3.3 fixed the problem.