I don't see you calling window.DispatchEvents(); have you just forgotten to do so, or is it not shown in the provided code?
There might still be some trouble if you intend to share events between Avalonia and SFML, that one will consume all the events of the other.