Have a look at the following functions:sf::Window::setPosition()
sf::VideoMode::getDesktopMode()
You can't get the taskbar, menu or border size via SFML.
unfortunately, they were not useful.
this is the same as the initial position.
sf::Window window(...);
auto desktop = sf::VideoMode::getDesktopMode();
window.setPosition(desktop.width/2 - window.getSize().x/2, desktop.height/2 - window.getSize().y/2);