I still dont understand what needs to be changed in the seed creation algorithm in order to get such a seed that electrum calls segwit
It needs to have a 0x100 version number, according to the documentation above. During seed phrase generation, the wallet software generates seeds until the hash of their seed phrase begins with the specified version number, in this case, 0x100. So, in order for your algorithm to be compatible with Electrum, it has to check the first two bytes of the hash of the seed phrase.