The 777 uses an automatic speed trimmer...
(Auto RAT deployment or high windmill speed) the system and the autopilot would remain engaged and try to maintain the assigned flight profile.
If you don't know for sure... don't post.
A/P will disengage.
After fuel starvation it becomes a big glider... gliding all the way down at the speed with which it was happily cruising along.