Context. Isotopic fractionation is an important tool for investigating the chemical history of our Solar System. In particular, the isotopic fraction of nitrogen (14N/15N) is lower in comets and other pristine Solar System bodies with respect to the value measured for the protosolar nebula, suggesting a local chemical enrichment of 15N during the formation of the Solar System. Therefore, interferometric studies of nitrogen fractionation in Solar System precursors are needed for us to obtain clues about our astrochemical origins. Aims. In this work we have investigated the variation in the 14N/15N ratio in one of the closest analogues of the environment in which the Solar System was born: the protocluster OMC-2 FIR4. We present the first comparison at high angular resolution between HCN and N2H+ using interferometric data. Methods. We analysed observations of the HCN isotopologues H13CN and HC15N in the OMC-2 FIR4 protocluster. Specifically, we observed the transitions H13CN (1−0) and HC15N (1−0) with the NOrthern Extended Millimeter Array (NOEMA) within the context of the IRAM Seeds Of Life In Space (SOLIS) Large Program. We combined our results with analysis of archival data obtained with the Atacama Large Millimeter Array of N2H+ and its 15N isotopologues. Results. Our results show a small regional variation in the 14N/15N ratio for HCN, from ~250 to 500. The ratios in the central regions of FIR4, where the candidate protostars are located, are largely consistent with one another and within that range (~300). They also show little variation from the part of the protocluster known to harbour a high cosmic-ray ionisation rate to the portion with a lower rate. We also found a small variation in the 14N/15N ratio of N2H+ across different regions, from ~200 to ~400. Conclusions. These results suggest that local changes in the physical parameters occurring on the small linear scales probed by our observations in the protocluster do not seem to affect the 14N/15N ratio in either HCN or N2H+ and hence that this is independent of the molecule used. Moreover, the high level of irradiation due to cosmic rays does not affect the N fractionation either.