With the window casing where it is Mike, I'd say remove the panel up to the height of the refrigerator and cap it with a piece of trim or something. The shelf would stabilize the top portion. Matching a cabinet might be a PITA
That'll avoid the footprint on the ceiling I'm guessing is there.
View attachment 1716295942
View attachment 1716295943