Mercier, Judge.Stacey Boling, the biological maternal grandmother of A. L. S., appeals two juvenile court orders entered in a dependency action she filed. In Case No. A19A0282, Boling appeals the dismissal of the dependency case. In Case No. A19A0479, she appeals a protective order requiring her to return all copies of certain court records to the juvenile court upon conclusion of the appeal in Case No. A19A0282. For the reasons that follow, we vacate both orders and remand the cases to the juvenile court with direction.In April 2016, Boling filed in juvenile court a petition for dependency and for temporary custody of A. L. S. Boling alleged that A. L. S.’s mother, Cassandra Shaver, was abusing controlled substances and was facing heroin possession charges, and that one-year-old A. L. S. was in Boling’s custody.[1] In May 2016, after a hearing, the juvenile court entered an adjudication of dependency, finding that A. L. S. was dependent as a result of Shaver’s substance abuse; that removal from Shaver’s home was in the child’s best interest; and that Boling knows, cares for, has had a long-term relationship with, and acts in the best interest of A. L. S. The juvenile court awarded Boling temporary legal custody of A. L. S. until further order of the court. In July 2016, the juvenile court entered a disposition order awarding Boling (as the child’s biological grandmother and “fictive kin”) temporary legal and physical custody of the child, finding that such was in the child’s best interest. The order required Shaver to undergo drug testing and enter either a 12-month residential treatment program or the Family Treatment Dependency Court program of the Accountability Court of the Mountain Judicial Circuit. The order provided that if Shaver elected to participate in the family treatment dependency court program, she was required to, inter alia, “execute a waiver and release so that the Family Treatment Dependency Court . . . shall promptly provide to [Boling's attorney] and the Juvenile Court” the results of all drug screens and tests and evidence of all sanctions resulting from her participation in treatment. The disposition order pertinently provided that legal custody of A. L. S. would not be returned to Shaver until she successfully completed the substance abuse treatment and drug screens required therein.In April 2017, Teresa Franklin (who had adopted Shaver as a child), and her husband, Phillip Franklin, moved to intervene in the juvenile court dependency action, seeking temporary custody of A. L. S. They alleged that Shaver was unable to care for the child due to her substance abuse, that they are the legal grandparents, that they have provided support for the child, and that they are fit to have custody. The juvenile court granted the motion to intervene in August 2017.The dependency case underwent numerous judicial review hearings between August 2016 and October 2017. In the review hearing order entered on October 31, 2017, the juvenile court found that it was in the child’s best interest to be returned to the temporary custody of Shaver, subject to certain requirements set out in that order, and provided for Boling and the Franklins to have visitation.A few months earlier, in April 2017, while the dependency action was still pending in juvenile court, the Franklins filed an Amended Petition for Grandparent Custody in superior court, seeking temporary and permanent custody of A. L. S.[2] In the amended petition, they alleged that Shaver had a history of substance abuse and remained a threat to A. L. S.’s well-being; that they had cared for and supported A. L. S. throughout her life; that Boling formerly allowed the Franklins to have visitation with A. L. S, with whom they shared a bond; that they had a suitable home for A. L. S.; and that A. L. S. would suffer harm if not placed in their custody.On January 5, 2018, Boling filed a “Motion for Order Enforcing Provisions of Review Hearing Order Dated October 31, 2017,” alleging that Shaver had violated the drug provisions of that order and that the juvenile court should change custody pursuant to the terms of the order.On January 24, 2018, without ruling on the motion to enforce the order, the juvenile court sua sponte dismissed Boling’s dependency action. In its dismissal order, the juvenile court stated that Shaver and the Franklins had entered into a consent agreement in the superior court case in which Shaver gave full custody of the child to the Franklins; that there appeared to be no dependency issue as to the Franklins; that all parties to the juvenile court action were also parties to the superior court action; and that the juvenile court lacked jurisdiction because the custody dispute no longer involved dependency issues.Boling filed a notice of appeal from the juvenile court’s dismissal order and, on July 12, 2018, moved the juvenile court to correct the record by adding certain exhibits and three orders that had not been included in the appellate record. The court ruled that the three orders Boling sought to add should not have been in the juvenile court’s record, but that the orders would be included in the record for consideration on appeal or other review. On the same date, the juvenile court issued a separate “Protective Order.” The protective order stated that the three orders at issue in the motion for correction of record should not have been made available to Boling, that she could not disclose the orders in any manner except for consideration on appeal, and that upon the conclusion of the appeal, the parties would return all copies of the orders and certify that they had done so.Case No. A19A02821. Boling contends that the juvenile court erred by sua sponte dismissing the dependency case. She asserts that the juvenile court failed to give the parties notice and a hearing before doing so, failed to make a determination as to the child’s best interest, and apparently deferred to the superior court when the superior court had not made a custody determination. We agree that the juvenile court erred by dismissing the case.This Court reviews a juvenile court’s decisions on issues of law de novo. In the Interest of K. B., 347 Ga. App. 694 (820 SE2d 732) (2018).In its dismissal order, the juvenile court included the following findings: the Franklins filed a custody action in superior court; “it . . . further appear[s] that the [Franklins] and the Mother of [A. L. S.] have entered into an Agreement in the Superior Court case giving the [Franklins] full legal and physical custody of [A. L. S.]“; “[i]t further appear[s] that [A. L. S.] is in the physical custody and control of the [Franklins] and that there appears to be no dependency as to the [Franklins]“; and all parties in the juvenile court action are also parties to the superior court action. Stating that custody disputes that do not also involve issues of dependency are not within the exclusive original jurisdiction of the juvenile court, the juvenile court concluded: “As this case appears to be a custody dispute that no longer involves issues of dependency, . . . this case is dismissed for lack of jurisdiction.” We hold that the juvenile court did not lack jurisdiction when it ordered the dismissal.The juvenile court has exclusive original jurisdiction over juvenile matters of dependency and is the sole court for initiating actions concerning a child that is alleged to be a dependent child. OCGA § 15-11-10 (1) (c). “A court, having obtained jurisdiction, retains it until the final disposition of the cause.” Owen v. Owen, 195 Ga. App. 545 (394 SE2d 580) (1990) (citation and punctuation omitted). And while the juvenile court lacks jurisdiction over a petition for permanent custody of a child in the absence of a transfer order from a superior court, Ertter v. Dunbar, 292 Ga. 103, 105 (734 SE2d 403) (2012), Boling’s dependency petition was not one for permanent custody. A dependency proceeding is brought to determine whether a child is dependent, and the juvenile court is authorized to assign temporary custody of a dependent child. Long v. Long, 303 Ga. App. 215, 218 (2) (692 SE2d 811) (2010). Even if the juvenile and superior courts had concurrent jurisdiction over the temporary custody issue, “whichever [court] first takes jurisdiction shall retain it, unless a good reason shall be given for the interference of equity.” Id. (citation and punctuation omitted).From April 2016 until the date of dismissal (January 24, 2018), the juvenile court considered whether A. L. S. was abused or neglected and in need of the court’s protection, and the court continued to exercise its jurisdiction over the child in connection with those dependency issues. See OCGA § 15-11-2 (22) (a). Even when the juvenile court returned temporary custody to Shaver pursuant to the October 31, 2017 judicial review hearing order, it did so subject to numerous conditions. Among them, Shaver would immediately lose custody of A. L. S. upon failing or missing drug screens. Notably, the record shows that the juvenile court had notice by June 2017 that the Franklins’ custody action was pending in superior court. Still, the juvenile court conducted an evidentiary judicial review hearing with all of the parties in August 2017. The October 31, 2017 order specified that it would remain in effect until Shaver successfully completed the treatment program and the court’s jurisdiction ended or until further order of the court. A motion to enforce that order was filed in January 2018 and was pending when the dismissal order was entered.At the time the juvenile court entered the dismissal order, the case was still a dependency action and the juvenile court retained original exclusive jurisdiction. See generally Owen, supra. The juvenile court had already exercised its jurisdiction over the temporary custody of A. L. S. in the dependency action, and we cannot conclude that the superior court had good reason to interfere. See Long, supra at 218-219 (2). Indeed, the Franklins’ superior court petition for temporary and permanent custody alleged that Shaver’s substance abuse presented a threat to A. L. S.’s well-being, that A. L. S. was in Boling’s custody and that the child would suffer harm if not placed in the Franklins’ custody; these issues were already being considered in the juvenile court dependency action – a case in which the Franklins had intervened. The juvenile court did not lack subject matter jurisdiction. Compare In the Interest of C. C., 193 Ga. App. 120, 121 (1) (387 SE2d 46) (1989) (juvenile court lacked subject matter jurisdiction to hear grandparents’ petition for permanent custody filed in juvenile court where complaint was not in the nature of a deprivation petition and it did not allege that the grandparents should be granted custody on the basis that the children were deprived); see generally In the Interest of M. F., 298 Ga. 138 (n. 1) (780 SE2d 291) (2018) (finding no significant distinction between the meaning of a “deprived” child and a “dependent” child under the old and new juvenile codes).Contrary to the juvenile court’s finding, the fact that Shaver and the Franklins executed a consent agreement purporting to place custody of A. L. S. with the Franklins did not resolve the dependency issue. (We note that Boling, who was also a party to the superior court action, was not a party to the consent agreement.) The consent of the mother to give the Franklins custody did not, by itself, give them legal custody of the child. See generally Skipper v. Smith, 239 Ga. 854, 857 (3) (238 SE2d 917) (1977). A trial court is not bound by a parties’ agreement regarding custody; such a result “would destroy the power of our courts to reject inadequate, overreaching, unconscionable or otherwise invalid settlement agreements of child custody disputes.” Wright v. Burch, 331 Ga. App. 839, 845 (1) (d) (771 SE2d 490) (2015) (citation and punctuation omitted). The record does not show that the parties’ consent agreement was adopted or approved by the superior court or that the superior court otherwise entered an order awarding custody in the case. The Franklins would have no legal right to custody until the entry of a court order giving them custody. See OCGA § 15-11-2 (42) (pertinently defining “[l]egal custodian” as a person to whom legal custody of a child has been given by a court order); see generally Skipper, supra.“The paramount concern in any change of custody must be the best interests and welfare of the minor child.” Scott v. Scott, 276 Ga. 372, 377 (578 SE2d 876) (2003) (holding invalid a self-executing change of custody provision in a divorce decree because such provisions fail to give paramount import to the child’s best interest, noting that whether a change of custody is warranted depends on the factual situation at the time custody modification is sought) (citation omitted).Thus, it was incumbent upon the juvenile court to determine what was in A. L. S.’s best interest at the time of its decision. Yet, the juvenile court did not conduct any evidentiary hearings for several months before entering its dismissal order. When it entered the preceding judicial review hearing order (October 31, 2017), the juvenile court awarded Shaver temporary custody of the child, subject to specific conditions, until a final disposition of the case. There is no evidence that at the time the dismissal order was entered, A. L. S. was in the Franklins’ custody (as the juvenile court said it appeared), that the child was no longer dependent, and that it was in the child’s best interest to be in their custody.Accordingly, we vacate the juvenile court’s order of dismissal and remand the case for proper resolution of the dependency petition. On remand, the juvenile court shall hear evidence relevant to the child’s current status and enter a disposition order containing findings of fact to support the order. See OCGA § 15-11-213 (setting forth factors to be considered before court enters disposition order and the requirement of written findings of fact); see generally Scott, supra (noting that whether a change of custody is warranted depends on the factual situation at the time the change would occur).2. Based on the foregoing, we do not reach Boling’s remaining claims enumerated in this appeal.Case No. A19A04793. Boling contends that the juvenile court erred by entering the protective order without giving her proper notice and a meaningful hearing. Inasmuch as the dismissal order is vacated, the protective order entered in connection with that dismissal order is also vacated.Judgments vacated and cases remanded with direction. Barnes, P. J., and Brown, J., concur.