Or more simply, he can use real-time input properly by calling sf::Mouse::isButtonPressed() unconditionally every frame, rather than only at the moment when the mouse button is first pressed.
If your goal was to check if the mouse pressed event was for the left or right mouse button, you're supposed to check event.mouseButton.button. Reread the tutorial about all the event types.
Also, sf::Vector2f has overloaded arithmetic operators, so subtracting the mouse and sprite positions should be one operation, not two.