insertID not returned correctly when using custom UUID

Bb3z5/14/2023
export const users = mysqlTable("users", {
  id: varchar("id", { length: 36 })
    .primaryKey()
    .default(sql`(uuid())`)
    .notNull(),
  email: varchar("email", { length: 255 }).notNull(),
  profileImageUrl: varchar("profile_image_url", { length: 255 }),
  name: varchar("name", { length: 255 }).notNull(),
});


I have a schema where I have set the ID to be a uuid, this works fine and inserts give me the correct ids. On insert I want to get the ID of the inserted record so I can redirect to the correct page, which I thought would be available on insertId but what I get returned from there is just a number. Is there another way to get the actual id of the inserted record?