Make a setting that kills (clear) the boss when its detected outside of the region. Entity seems to "remember" their targeted location which make them keep tryin to leave the area and get teleported constantly somtimes. So adding this feature would probably help performance and make the region keeping look cleaner. Also maybe you would summon a new entity upon killing the one leaving the region (or maybe not).
Make a setting that kills (clear) the boss when its detected outside of the region. Entity seems to "remember" their targeted location which make them keep tryin to leave the area and get teleported constantly somtimes. So adding this feature would probably help performance and make the region keeping look cleaner. Also maybe you would summon a new entity upon killing the one leaving the region (or maybe not).