I have come to a conclusion that the script command
SET_ADJUST_AREA_PORTALS
does not work if you are just rotating an entity (which is most likely a func_static). In more technical terms, I think you must move the entity's origin for the command to take effect.
This tiny bit of assumption is valid if you are making, for example, rotating doors. Most of the time it's a good habit to place an areaportal inside a door. That's OK with an ordinary func_door, but can be a bit more troublesome with a func_static posing as a rotating door. Otherwise this command is of course very efficient, if you just want to place an Areaportal inside an elevator made of a func_static. Works just like in movies, yes it does.
But not so with a rotating entity. I'm still experimenting with it, but the solution might be (seems to produce some action) to move the brush, even just very very slightly, when you rotate it (or if you must move it anyway, then it should be OK). Of course you must likewise move it back, when you close the door, lest you risk to have a leaking door.
Without the origin change, the areaportal doesn't dissappear when the entity rotates, and you will get a massive HOM.
If you have different experiences, just post them here. I don't mind to be corrected, when I'm not sure I'm right...