It seems to me that beds might be getting overloaded, they're used to set the personal spawn point, pass the night to avoid most hostile mobs
and now the occasional use avoids attacks by a particular mob that many people strongly dislike, perhaps their different functions should be separated so that for instance one could avoid phantom attacks without changing the spawnpoint. (Like in the Bedrock edition.)
Also, beds are needed for villager breeders and iron farms (and are highly problematic around these and trade halls if casually placed).
Reworking MobB to be like what was teased (and voted for) as described above would not only transform the mob into a useful addition but (because it would spawn only in fairly unusual conditions and in ways that could be effectively countered) greatly lessen the fraction of playtime when constant worry about a bed (and how long had elasped since one had tagged up) interfered with enjoying building.
With the need for constant bed use removed/lessened, so too would be the dribve to split these functions (a thoroughly logical ideal that seems to have run afoul of MS/Mj intransigence).
Rollback Post to RevisionRollBack
WARNING: I have an extemely "grindy" playstyle; YMMV — if this doesn't seem fun to you, mine what you can from it & bin the rest.
Ok, so I get that phantoms can be annoying. If you want to build and not worry about mobs, turn the difficulty level down to peaceful (I personally consider that to be cheap, but still.) if you are building in the sky, is it too hard to build a 2-block dirt platform to place a bed on? I think they should be fixed a bit, like spawning higher up and having their own mob cap, but not totally removed.
That's one way except MAYBE the OP still wants Zombies etc to spawn.
I'm no expert but I do read a lot of command/redtsone tutorials etc - I can't remember all the facts BUT IIRC (maybe wrongly) the OP could place a Command block in his spawn chunks that's constantly running that kills off any phantoms that may spawn near a player
A quick Google shows that the command "/kill @e[type=slime]" will kill all slimes in the world (although I suspect having this continuously running may cause lag) so changing it to '/kill @e[type=phantom]' should kill all phantoms
I'm sure some expert command block programmer would come up with a command that can kill any Phantoms that spawn near a player (an '/execute at @p as kill @e[type=phantom]' type command perhaps ??) to make the command only run when phantoms spawne near players & not run all the time
Edit: Further searching & I found this further down p[ost you'll see one poster did exactly the sort of thing I mentioned but he used a hopper clock and a radius.. it's an old post so I guess in 1.12+ it may've changed