When I say "Sorry for bothering you" that means I'm still bothering you .
But if it has just finished at the time of speaking but lasted for a long time shall I say "Sorry to have bothered you": "Sorry to have bothered you." or Sorry because I have been bothering you ""Sorry because I have been bothering you."?