If you dont want to get boarded remove all your pirates.
When someone tries to board you it says " can't board you don't have pirates" or someting like that.
When i look in logbook I didn't get boarded and dont lose gold.
Press thanks if it works. and Maybe I'll try to find more bugs