Yes, global variables are really error-prone (initialization and destruction order, multithreading, no access control, lots of dependencies). Even more
sf::RenderWindow, never make it global.
I declare a render window in main.cpp and wherever I need it I just call extern MyWindow and use the render window rather than using it as a function argument, mostly because it looks cleaner.
That's not cleaner, actually it's the opposite. You should really not use global variables.
I don't actually see the problem with parameters: It's not that you have to pass the window everywhere -- just where you need it. If you end up passing it everywhere, that's a good hint to reflect about your design, since only a few parts actually need the window. Drawable entities
do not need to know it -- it is enough if the class that draws them has knowledge of the window.
This topic has been discussed many times, you find more information if you search the forum.