The refrigerator door is usually considered bad for the room door, but it is fine for the window, because the window is not the entrance.
In addition, it is best not to let the sunlight entering the room through the window directly illuminate the refrigerator to avoid the problem of excessive cold leakage in the refrigerator.