Lower your tank water giving about an inch of allowance (eg. 10 inch height fish, provide 11 or 12 inch height water level).
In some cases, your fish will gradually correct itself over few weeks.
But that fish should never be kept in high water level tank again, otherwise it'll revert headstanding.
The knot Imho, is bend spine... It's permanent.
All headstanding fish will have that knot.