Why choose to attain Nirvana when we can become Brahmas (or Bodhisattvas)? As I understand, once someone attains Nirvana and passes away, there is no more dependant arising, meaning this person no longer manifests as a person or being in any realm. This also means that this person loses his personhood (although this personhood is impermanent and is part of dukkha).

On the other hand, by achieving the first four Jhanas, a person could be reborn in the Brahma realms, which I understand to be the best beings in the universe, besides the Bodhisattvas. Of course, this is still impermanent and part of dukkha, but one could keep trying over and over to be reborn again and again in the Brahma realms.

The other possibility is to become a (Mahayana) Bodhisattva, in which case one maintains his personhood also. Although a Bodhisattva is destined to become a Buddha.

The question is, why should sentient beings choose to end their personhood permanently, rather than trying to be reborn again and again as the best person possible?
"[...] This also means that this person loses his personhood (although this personhood is impermanent and is part of dukkha)."

I wouldn't say "loses". It may be worth reminding that Nirvana should not be considered annihilation. Complementing:


  Bhikkhus, it is impossible that a bhikkhu who considers nibbāna to be suffering will possess a conviction in conformity [with the teaching]. [...] [But] it is possible that a bhikkhu who considers nibbāna to be hapiness will possess a conviction in conformity [with the teaching].
  
  -- Nibbāna [Bodhi Trans.], AN 6:101


"On the other hand, by achieving the first four Jhanas, a person could be reborn in the Brahma realms, which I understand to be the best beings in the universe, besides the Bodhisattvas."

Personal preferences aside, if we are talking about happiness, Nibbāna is declared to be supreme. A happiness and security from suffering unknown to a Brahma or Bodhisattva.

Also, perhaps is not so surprising the idea of devas of superior realms desiring to be born as humans:


  "It's a gain for you, monks, a great gain, that you've gained the opportunity to live the holy life. I have seen a heaven named 'Six Spheres of Contact.' Whatever form one sees there with the eye is desirable, never undesirable; pleasing, never displeasing; agreeable, never disagreeable. Whatever sound one hears there with the ear... Whatever aroma one smells there with the nose... Whatever flavor one tastes there with the tongue... Whatever tactile sensation one touches there with the body... Whatever idea one cognizes there with the intellect is desirable, never undesirable; pleasing, never displeasing; agreeable, never disagreeable.
  
  -- Khana Sutta, SN 35.135


"[...] but one could keep trying over and over to be reborn again and again in the Brahma realms."

...and, while trying, out of inattention or forgetfulness or simply ignorance, one may do something foolish -- because that's what we do as ignorants. Foolish enough to open one's mind to darker unwholesome states, perhaps in a chain reaction, and end up in a worse destination (though reappearing as a human during a time with no dhamma, and no condition to develop oneself to become a Buddha might be bad enough). Perhaps you were Brahma before, and now here you are, among humans (again?). I guess, as long as one thinks this endeavor is worth...

"The question is, why should sentient beings choose to end their personhood permanently, rather than trying to be reborn again and again as the best person possible?"

One way of answering is to ask "What's to end?".

Here is an appeal from the Buddha himself as to why one should reach Nirvana:


  "Bhikkhus, this samsāra is without discoverable beginning. A first point is not discerned of beings roaming and wandering on hindered by ignorance and fettered by craving. What do you think, bhikkhus, which is more: the stream of tears that you have shed as you roamed and wandered on through this long course, weeping and wailing because of being united with the disagreeable and separated from the agreeable -- this or the water in the four great oceans?"
  
  "[...] venerable sir, [...] this alone is more than the water in the four great oceans."
  
  "Good, good, bhikkhus! It is good that you understand the Dhamma taught by me in such a way. [...] For a long time, bhikkhus, you have experienced the death of a father ... the death of a brother ... the death of a sister ... the death of a daughter ... the loss of relatives ... the loss of wealth ... the loss through illness [...]. For what reason? Because, bhikkhus, this samsāra is without discoverable beginning ... It is enough to experience revulsion towards all formations, enough to become dispassionate towards them, enough to be liberated from them."
  
  -- Tears [Bodhi Trans.], SN 15.3