AUTO.LAND going to the origin with optical flow

Hello,

I am trying to setup a small quadrotor for indoor use.
We have been resorting to an External Positioning System (Optitrack), but we are now trying to setup a drone with optical flow only.

The estimates seem to be very decent: POSITION mode holds well, and we can control the drone in OFFBOARD mode using the position estimates. However, we observed this weird behavior while testing, in which switching to AUTO.LAND mode would drive the drone to the origin, instead of landing at the current position.

Here is some relevant information:
Firmware version: v1.14.2 (modified to incorporate this pull request: Fix scaling issue with thoneflow/holybro optical flow pmw3901 uart driver by dirksavage88 · Pull Request #22611 · PX4/PX4-Autopilot · GitHub)
Flight controller: Kakute H7 v2 (no SD card, so I cant provide logs)
Optical Flow sensor: Holybro PMW3901
Lidar Sensor: Holybro ST VL53L1X Lidar