Your comments

I noticed that it does damage to defenses and creatures in a certain area around the target, and pretty decent damage, I must say. But not to the target itself.

However, I thought it's intentional, since it's not an ordinary creature.

It often happens when you load a save, as far as I can tell. For example, one of MPD maps has porkzilla imprisoned and surrounded by guards. Sometimes when you load a save, it's not inside the prison any longer, and walks around the prison together with guards (being neutral creature, thus they don't attack it). But if you load the same save again, everything's fine.

As if at some point of loading the save creatures can more freely, ignoring things like prison walls.

I tested it a bit more. Initially, when you just found them, beasts somehow ignore the sleeping need, as if they understand you can do nothing about it. Meaning sleep can go all the way to 0% and they still will be happy. But once you save and load the save, they kinda remember they need sleep too, and become unhappy over time.

I wonder if it's possible too keep this effect after loading a save.

I just had no choice but to turn them into gold :(

But I figured it's intentional design, to teach players that sometimes you have to do it.

In this case their bodies stay inside, and you can't imprison them for real.

I've seen it sometimes on some other maps. Sometimes enemy units are getting trapped in prison somehow, but they are not real prisoners, they just cannot leave prison because it has no doors. Your only option is to sell the prison, defeat them and then build it again.

Я видел такое на некоторых картах. Иногда вражеские юниты каким-то образом застревают внутри тюрьмы. Но они не являются заключенными, поэтому их нельзя взять в руку. Они просто не могут покинуть пределы тюрьмы, так как у нее нет дверей. Остается только продать тюрьму, убить их и построить ее заново.

Here they explained that unique heroes don't have any needs other than gold. Looks like they work in the same way as golden sentinels.

I don't think it's a bug. It's always been like that, unique heroes don't use beds.

I double checked it by moving all saves to another folder and downloading and loading the one I uploaded here.

Here is a full guide :)

Three artifacts in archive, the sin artifact is waiting to be identified.

The fourth artifact is near the shrine.

Arcanists finished identification, I'm gonna use the sin artifact

And there we go, a worker begins the eternal struggle against the shrine