That's [a myth](https://www.thompsons-scotland.co.uk/blog/main/are-there-really-no-trespassing-laws-in-scotland) but even if it weren't, laws on criminal damage could still apply as OP's door was damaged when the police may have had no right of entry.