Note from @unknown: the attached test world includes a modified version of the addon provided by the reporter. I have set the projectile's power, inertia, and uncertainty to 1, and it's despawn timer to 1.0 seconds. I have also slowed the fire rate of the NPC. These changes make the the cause of the issue easier to see and understand.
Steps to reproduce
See
[media]
Load the attached test world.
Spawn a villager on the block labelled "Z = 23".
Observe that the bullet fired by the NPC despawns before it hits the villager.
Spawn a villager on the block labelled "Z = 22".
Observe that the bullet fire by the NCP hits the villager.
Kill the villgers.
Stand on the block labelled "Z = 23".
Changed to survival mode.
Slowly move forward until you get hit by the bullet.
Expected result
The bullet hits you (the player) at the same max range that it hits villagers.
Observed result
The bullet hits the player at a max range of 16 blocks, but hits villagers at a max range of 22 blocks.
Analysis
The bullet moves 1 block/tick and despawns after 1 second, so it travels from the NPC at Z = 0 to Z = 21. It hits the villager at Z = 22 based on its trajectory when it is ticked for the last time at Z = 21. The bullet also hits the player server-side at the same distance. However, the player does not take damage from the bullet until the bullet hits the player client-side. The client-side position of the bullet trails the server-side position by about 300 ms due to MCPE-179969. If the bullet despawns during the 300 ms that its client-side position is catching up to where it hit the player server-side, then it does not damage the player. The player takes damage in the test world only at Z <= 16 because that distance allows the server-side bullet to survive without despawning for long enough that the client-side bullet position can catch up to the player's position.
When there has component "minecraft:despawn" in projectile, the mob who shoots projectile cannot deal any damage to the player. However, this mob can still deal damage to other non-player mob in same distance. And if I delete the component "minecraft:despawn", the projectile gets back to normal.
In the zip I upload, I make a easy Bedrock_Addon to show this bug. I am sure that it is not the problem of my projectile, the timer that makes projectile's despawn is normal, After testing, the projectile can fly a distance of 60 blocks before it despawn.
The way to test the test_bullet in zip is spawn a villager in front of the test_npc, and switch the survive gamemode for player.
[media]
[media]
Linked issues
relates to 2
Attachments
Comments 2

Thank you for your report!
After consideration, the issue is being closed as Won't Fix.
Please note that this is not the same as Working as Intended, as this bug report correctly describes behavior in the game that might not be the intended or desirable behavior, but it will not be fixed right now. Sometimes, this is because the issue reported is minor and/or impossible to change without large architectural changes to the code base.
Quick Links:
📓 Bug Tracker Guidelines -- 💬 Community Support -- 📧 Mojang Support (Technical Issues) -- 📧 Microsoft Support (Account Issues) -- 📓 Project Summary -- ✍️ Feedback and Suggestions -- 📖 Game Wiki