I was able to make it work following this answer to came up with the solution.
The key is to use the mask feature in FontAwesome.
For instance, in VueJs, for the instagram icon, we can use next code:
<font-awesome-icon :icon="['fab', 'instagram-square']" :class="icon" :mask="['fas', 'square-full']" />
.icon {
color: white;
background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
background: -webkit-radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
All credits go for user sylvainDNS of the related comment.