Nearby heat can change the environment the refrigerator must work in. Its relevance depends on the appliance's specified clearances and operating conditions.
What the observation tells you
A problem that appears when heating is turned on may be related to the room conditions, but the timing does not identify a failed part. Do not attach improvised insulation to the fridge or move it without considering power cables and safe handling.
A useful next step
Compare the existing arrangement with the manufacturer's requirements and report the nearby heat source. A suitable professional can assess placement or ventilation where needed, while an actual cooling fault remains a separate question.
Manuals and supporting guidance
Model-specific instructions take priority. These references support the practical principles discussed here; they do not diagnose your appliance.