Subsection (2) applies where—
section 21(1) or 22(1) applies,
before the child's home came to be with the prospective adopters, the child was looked after by a local authority, and
the child continues to be looked after by a local authority.
Except where subsection (3) applies, the local authority must not remove the child from the care of the prospective adopters.
This subsection applies if—
the removal is made in accordance with section 25 or 26,
an appropriate court grants leave for the removal, …
the removal is authorised by virtue of Chapter … 3 of Part II of the 1995 Act or
the removal is authorised by an order or warrant under the Children’s Hearings (Scotland) Act 2011 (asp 1) .