Movie in the age of pirates, a girl searching for a treasure map consisting of three parts

Help me find this movie
Set in the time of pirates

You must collect a three-piece treasure map

The first part of the map was inherited by a girl from her father
The second part of the map The girl’s uncle gave her the map
The third part of the map, the girl’s uncle drew it on his head

The girl got two parts and the third part is left
After a battle with her uncle, she got the third part of the map and her uncle’s head was cut off to merge all the parts of the map together
The treasure hunt begins

At the end of the events of the movie, the girl despairs of finding the treasure because the map says she must walk 40 steps forward, but when she walks forward for some steps, she finds the end of the mountain and then an abyss to the bottom.

I watched the movie in 2002 and I don’t know when it was produced, but it is expected between 1995 to 2002

“Cutthroat Island” (1995)

Quotes from the above Wikipedia page:
“Black Harry has one of three pieces of a map to a huge stash of gold on the remote Cutthroat Island,”
“A dying Harry reveals to his daughter the location of the map piece: on his scalp.”
" After scalping her dead father for the piece, Morgan, now the captain of her father’s ship, the Morning Star, sets out for the treasure."