On the nearest-square function - Part 2 and the quantity $m^2 - p^k$ where $p^k m^2$ is an odd perfect number (Note:  This question has been cross-posted to MO.)
This question is an offshoot of this earlier one and this other question.
Let $n = p^k m^2$ be an odd perfect number with special prime $p$ satisfying $p \equiv k \equiv 1 \pmod 4$ and $\gcd(p,m)=1$.
It was conjectured in Dris (2008) and Dris (2012) that the inequality $p^k < m$ holds.
Brown (2016) showed that the Dris Conjecture (that $p^k < m$) holds in many cases.
It is trivial to show that $m^2 - p^k \equiv 0 \pmod 4$.  This means that $m^2 - p^k = 4z$, where it is known that $4z \geq {10}^{375}$.  (See this MSE question and answer, where the case $m < p^k$ is considered.)  Note that if $p^k < m$, then $$m^2 - p^k > m^2 - m = m(m - 1),$$
and that
$${10}^{1500} < n = p^k m^2 < m^3$$
where the lower bound for the magnitude of the odd perfect number $n$ is due to Ochem and Rao (2012).  This results in a larger lower bound for $m^2 - p^k$.  Therefore, unconditionally, we have
$$m^2 - p^k \geq {10}^{375}.$$
We now endeavor to disprove the Dris Conjecture.
Consider the following sample proof argument:
Theorem If $n = p^k m^2$ is an odd perfect number satisfying $m^2 - p^k = 8$, then $m < p^k$.
Proof
Let $p^k m^2$ be an odd perfect number satisfying $m^2 - p^k = 8$.
Then $$(m + 3)(m - 3) = m^2 - 9 = p^k - 1.$$
This implies that $(m + 3) \mid (p^k - 1)$, from which it follows that
$$m < m + 3 \leq p^k - 1 < p^k.$$
We therefore conclude that $m < p^k$.
QED
So now consider the equation $m^2 - p^k = 4z$.  Following our proof strategy, and the formula in the accepted answer to the first hyperlinked question, we have:
$$m^2 - \bigg(\lfloor{\sqrt{m^2 - p^k} + \frac{1}{2}}\rfloor\bigg)^2 = p^k + \Bigg(4z - \bigg(\lfloor{\sqrt{m^2 - p^k} + \frac{1}{2}}\rfloor\bigg)^2\Bigg).$$

So the only remaining question now is whether it could be proved that
$$\Bigg(4z - \bigg(\lfloor{\sqrt{m^2 - p^k} + \frac{1}{2}}\rfloor\bigg)^2\Bigg) = -y < 0$$
for some positive integer $y$?

In other words, is it possible to prove that it is always the case that
$$\Bigg((m^2 - p^k) - \bigg(\lfloor{\sqrt{m^2 - p^k} + \frac{1}{2}}\rfloor\bigg)^2\Bigg) < 0,$$
if $n = p^k m^2$ is an odd perfect number with special prime $p$?
(Additionally, note that it is known that $m^2 - p^k$ is not a square, if $p^k m^2$ is an OPN with special prime $p$.  See this MSE question and the answer contained therein.)
If so, it would follow that
$$\Bigg(m + \lfloor{\sqrt{m^2 - p^k} + \frac{1}{2}}\rfloor\Bigg)\Bigg(m - \lfloor{\sqrt{m^2 - p^k} + \frac{1}{2}}\rfloor\Bigg) = p^k - y$$
which would imply that
$$\Bigg(m + \lfloor{\sqrt{m^2 - p^k} + \frac{1}{2}}\rfloor\Bigg) \mid (p^k - y)$$
from which it follows that
$$m < \Bigg(m + \lfloor{\sqrt{m^2 - p^k} + \frac{1}{2}}\rfloor\Bigg) \leq p^k - y < p^k.$$
Update (November 11, 2020 - 10:21 PM Manila time) Please check out the recently posted answer for a minor adjustment to the logic that should make the general proof argument work.
 A: If you don't have a proof that the smallest square larger than $m^2-p^k$ is not $m^2$, then your method does not work.
Otherwise, your method works.
Using your idea, one can prove that if $\lfloor\sqrt{4z}+1\rfloor\lt m$, then $m\lt p^k$.
Proof :
Subtracting $\lfloor\sqrt{4z}+1\rfloor^2$ which is the smallest square larger than $4z$ from the both sides of
$$m^2=p^k+4z$$
gives
$$m^2-\lfloor\sqrt{4z}+1\rfloor^2=p^k-\lfloor\sqrt{4z}+1\rfloor^2+4z$$
which can be written as
$$(m-\lfloor\sqrt{4z}+1\rfloor)(m+\lfloor\sqrt{4z}+1\rfloor)=p^k-\lfloor\sqrt{4z}+1\rfloor^2+4z\tag1$$
So, we can say that
$$m+\lfloor\sqrt{4z}+1\rfloor\mid p^k-\lfloor\sqrt{4z}+1\rfloor^2+4z\tag2$$
If $\lfloor\sqrt{4z}+1\rfloor\lt m$, then LHS of $(1)$ is positive, so RHS of $(1)$ is positive. So, we can say that$$(2)\implies m+\lfloor\sqrt{4z}+1\rfloor\le p^k-\lfloor\sqrt{4z}+1\rfloor^2+4z$$from which we can have$$m\lt m+\lfloor\sqrt{4z}+1\rfloor\le p^k-\lfloor\sqrt{4z}+1\rfloor^2+4z\lt p^k.\quad\blacksquare$$

If $m=\lfloor\sqrt{4z}+1\rfloor$, then letting $\sqrt{4z}=N+a$ where $N\in\mathbb Z$ and $0\le a\lt 1$, we have
$$p^k-m=(N+1)^2-(N+a)^2-N-1=(1-2a)N-a^2$$
whose sign depends on $a$ and $N$.
A: Let me illustrate what I have in mind for a small value of $z$, say $z=10$.
Then we have
$$m^2 - p^k = 4z = 40$$
$$m^2 - 49 = p^k - 9$$
$$(m+7)(m-7) = p^k - 9.$$
This implies that
$$(m+7) \mid (p^k - 9)$$
from which it follows that
$$m < m+7 \leq p^k - 9 < p^k.$$
Note that $49$ is not the nearest square to $40$ ($36$ is), but rather the nearest square larger than $40$.
With this minor adjustment in the logic, I would expect the general proof argument to work.
