As long as you place a hit on a target ship within 10 seconds of it being destroyed then NPCs cannot steal a kill from you, are your targets clean, if so are you using a KWS scanner to check if they have bounties outside the system you are in (is it an Anarchy System) or are you in a conflict zone, if a conflict zone have you chosen a side?
To be able to avoid being scanned at a station get your heat down, turn systems off and go silent running then make your docking run the closer to 30% heat you are the less likely you are to be scanned before entering the letterbox. Hell if needs be do all the above and drop a heat sink to get you below 30% and then you wont get scanned at all. To avoid being scanned when elsewhere, go silent running, boost and jump out, get around 2-3km between you and the authority ship and you wont need silent running.
If you are staring at your FSD then there is a problem with you connection or do you mean Supercruise?
Stations rarely shoot you for no reason, (I have never had this issue and been in since Beta) have you forgot to ask for docking clearance or are loitering, perhaps an unpaid bounty?