Despite the fact that the Prime Minister of Japan is elected by the House of Representatives, the Prime Minister usually would take the responsibilities following the House of Councillors election results, include resignation or cabinet reshuffle.
In Japan's government structure, although the Prime Minister is elected by the House of Representatives, they usually assume leadership after the results of the House of Councillors election are known, potentially leading to their resignation or a cabinet overhaul.