How to stop wordpress from redirecting from the post’s old slug after changing title and slug?

You need to provide a higher priority number than the default when removing hooks.

If you leave it default there’s a chance that your remove_action is executed prior to the add_action( 'template_redirect', 'wp_old_slug_redirect' )

So, instead:

remove_action( 'template_redirect', 'wp_old_slug_redirect', 20 );

You also need to prevent WP from saving the old slugs which can be turned off by removing these filter hooks.

remove_action( 'post_updated', 'wp_check_for_changed_slugs', 20 );
remove_action( 'attachment_updated', 'wp_check_for_changed_slugs', 20);

techhipbettruvabetnorabahisbahis forumuedueduedusedueduseduedueduedusedus