If is too hot to touch I would be concerned as to what internal temperatures reached.
I have a solar watch which sits on a bedside cabinet well away from the window and still picks up enough light to stay charged.
Personally I avoid placing anything, that’s not designed for the purpose, close to a window indefinitely.