When canceling the PortalCreateEvent or EntityPortalCreateEvent he should block the portal from being created
After canceling the spawn of a dragon from CreatureSpawnEvent, a bossbar should not appear since the dragon's spawn is canceled
Note: Nether portal is cancelled, only the end portal is not.
When canceling PortalCreateEvent or EntityPortalCreateEvent he is allowing the creation of portals but I believe the problem here is that the event is not being called so it is not canceled ...
After canceling the spawn of the CreatureSpawnEvent dragon, a boss bar appears, and the event is canceled (the dragon is not born but regardless a boss bar appears)