Being detained in a dream may mean that the dreamer understands old stereotypes and beliefs. The dreamer may be bound by the dream, so as not to let himself stay in front of a task for a long time and it is difficult to get away.
From a spiritual point of view, being imprisoned shows that the dreamer is too introverted or too focused on his own affairs. He wants to create new influence, seek outside help and support, and urge himself to get rid of imprisonment and develop.