Windows may have lost its sensors (accelerometer and gyro for rotation lock, the IR camera or presence sensor for Hello). Rotation lock only appears when Windows detects an orientation sensor, so a new keyboard was never likely to fix it. Either the sensor stack is broken in software or the hardware has failed.
Open Device Manager >
Turn on View > Show hidden devices.
Look for a Sensors category (accelerometer, gyro, "HID Sensor Collection", Surface or Qualcomm sensor entries).
Under Biometric devices, look for "Windows Hello Face Software Device", and under Cameras, the IR camera.
If Sensors is missing entirely, or devices show warnings or "Unknown device", that explains both symptoms.
In services.msc, check that Sensor Service, Sensor Data Service and Sensor Monitoring Service are present and not disabled.
In gpedit.msc (Pro edition), go to Computer Configuration > Administrative Templates > Windows Components > Location and Sensors, and confirm "Turn off sensors" is Not configured.
Run the Surface Diagnostic Toolkit
In the Surface app, go to Help & support and run the hardware tests. It checks the sensors and cameras directly and gives you a result you can show Microsoft.