The STV240N75F3 was still manufactured with older technology and had an elaborate and now very expensive housing. There is no replacement for this MOSFET because of the antiquated housing.
As @Community member said, it makes most sense to upgrade to a more modern housing with probably even better parameters.
Regards
/Peter
In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.