Prostitution is not allowed in Islam, by slaves or otherwise, and the earnings of prostitution are haram.
The Prophet (ﷺ) prohibited the earnings of slave girls (through
prostitution). Saheeh Bukhari
The Prophet (ﷺ) prohibited taking the price of a dog, the earnings of
a soothsayer and the money earned by prostitution. Saheeh Bukhari
The price of a dog is evil, the earning of a prostitute is evil and
the earning of a cupper is evil. Sahih Muslim
The fourth type of marriage was that many people would enter upon a
lady and she would never refuse anyone who came to her. Those were the
prostitutes who used to fix flags at their doors as sign, and he who
would wished, could have sexual intercourse with them ... But when
Muhammad (ﷺ) was sent with the Truth, he abolished all the types of
marriages observed in pre-Islamic period of Ignorance except the type
of marriage the people recognize today. Saheeh Bukhari
24:33 does not imply that it is acceptable for the slave-women to be made prostitutes if they don't seek chastity, rather it says that if they seek chastity but are forced by their masters then they would be forgiven by Allah. Abdullah bin Ubay, regarding whom is the hadith and verse you quoted, was a well known hypocrite.
If they are willing prostitutes and commit the act, then they would have committed Zina since it is sex with someone not a husband nor the master (23:5-7), and it is punishable under Shariah:
Quran 4:25 ... if they should commit adultery, then for them is
half the punishment for free [unmarried] women ...
The verdict of Allah's Messenger (ﷺ) was sought about an unmarried
slave girl guilty of illegal intercourse. He replied, "If she commits
illegal sexual intercourse, then flog her (fifty stripes), and if she
commits illegal sexual intercourse (after that for the second time),
then flog her (fifty stripes), and if she commits illegal sexual
intercourse (for the third time), then flog her (fifty stripes) and
sell her for even a hair rope." Ibn Shihab said, "I am not sure
whether the Prophet (ﷺ) ordered that she be sold after the third or
fourth time of committing illegal intercourse." Saheeh Bukhari
The men who harassed the women in 33:59 were hypocrites and not righteous Muslims, and the subsequent verses of the Quran address them:
Quran 33:60-61 If the hypocrites and those in whose hearts is
disease and those who spread rumors in al-Madinah do not cease, We
will surely incite you against them; then they will not remain your
neighbors therein except for a little. Accursed wherever they are
found, [being] seized and massacred completely.
Its obviously not permitted to harass slave-women, that goes against everything Islam stands for. The Quran does not say that it was acceptable of them to harass the slave women, rather it just advised the Muslim women to do what they can in power to protect themselves, similar to how modern law enforcement would advise people to avoid dark alleys.