~onDespawn trigger not working

Summary

~onDespawn trigger not working at all, not sure if it is even producing an error

Steps to reproduce

Add a ~onDespawn trigger to a mob, with a command where you can easily see it activate, like speak targetted at your player.

Teleport away to cause the mob to despawn

Observe event not triggering

Current behavior

~onDespawn does not cause events to happen when the mob despawns

Intended correct behavior

~onDespawn should function as intended.

Edited by Wortho27