Former US President Barack Obama worked "behind the scenes" to prevent Kamala Harris from becoming the Democratic nominee after Joe Biden withdrew from the 2024 race, according to an upcoming book.