Two or more molecular entities are described as isoelectronic if they have the same number of valence electrons and the same structure, i.e. number and connectivity of atoms, but differ in some of the elements involved. Thus: CO
are isoelectronic. CH2=C=O
are isoelectronic. and have the same number of electrons, but have different structures, hence they are not described as isoelectronic.
PAC, 1994, 66, 1077. 'Glossary of terms used in physical organic chemistry (IUPAC Recommendations 1994)' on page 1128 (https://doi.org/10.1351/pac199466051077)