Some Pubs ago they overlooked the TEF when a BH engages combat on a Jedi Mark. Both now get a TEF and cannot enter any player owned structures (even if the Jedi don't attacks at all...).
First of all, this only works with houses that have a balcony.
1. Place your safe house in not too much distance to your mission lair.
2. Walk onto the balcony and place any speederbike there and leave it alone.
3. Go outside and grind on your lair.
4. When a BH shows up, run to your house, target the bike and hit /mount.
5. You'll be in your vehicle on the balcony and the BH won't be able to attack you.
6. Rinse and repeat.
Edit: You might want to use a more unique ride such as a AB-1 landspeeder, cause you can make a macro that goes like this
With a speederbike (swoop) the system could mess with the attackers vehicle that you can of course not mount.