Instability of quark matter core in a compact newborn neutron star with moderately strong magnetic field