I would have pulled it straight up. Once it cleared the tree tops, it would have been visible again and you could have brought it down without losing it.
Unfortunately, this also illustrates the unspoken flaw of using safe mode, the plane will fly until the battery pack dies or it hits something tall enough to be in the way