It's complicated in the sense they started out not as that. Then they were but in private and very expensively. Then at some point it became common practice but was still shrouded in "sophistication" as the geishas would still have to do other things besides sex but in the end they still did it. Kind of like the difference between escorts and prostitutes in the present.
All these changes happened over different stages of Japans history and in different times and due to different political and economic situations... The movie was criticized for not adhering to the full reality of the time when this was a practise and sort of picked and chose which aspects of Japanese culture at the times to use for the sake of drama
So like I said, it's complicated. But in essence like boiled down to what we are talking about, geishas were prostitutes. In fact the entire 'industry' collapsed when people stopped paying heftt prices for the entire song and damce when all they wanted was sex and they just decided to go to actual brothels for cheaper. Then after that there was a resurgence of the industry where they no longer prostituted but they also never called themselves geishas again until they were firmly recognised as not offering sex but by then we are already in modern Japan which isn't Wano's setting.
Oda is not picking a specific time period of course to represent Japan for Wano but as it stands, majority of the time periods he's picking did have geishas as prostitutes. He's just ignoring that part
Actually they did started as that because they derive from the Oirans we were talking about earlier.
Oirans practically did the same, at least high class ones like Komurasaki would, and sexual practices were included assuming the sum was right and said Oiran could choose her customers.
Geisha are solely for entertainment purposes entirely without any sexual implications, they are basically hostesses that are trained in different artistic pursuits, whether it´s music, drawing, tea ceremony and whatever else might fit the occasion, but sexual stuff is literally exempt from a Geisha´s duties and practices. And a client pursuing sexual advances would immediately get kicked out and get a bad reputation in those circles.
So no, Geishas are not prostitutes, they emerged as a alternative to high class prostitutes.
It even happened quite often that important or/and rich customers would look for possible marriage candidates among Geishas since they have the reputation and education fitting for his status.
And the "downfall" of Geishas definitely has something to do with possible alternative options, but it also has something to do with society simply changing. Until 2nd WW, possible paths for women were prostitute, Geisha, servant or get married and become a housewife. Due to the war effort and thus out of necessity (similarly to Germany, whose factories were full of women) women had much more possibilities and became more independent, at least to a certain extent.