Check the following to fix the issue where login and log out from Moodle does not login and log out the users from the WordPress site

Check if you are using the latest version of Edwiser Bridge plugin and Single Sign On extension in both WordPress and Moodle site.

Check if Edwiser Bridge plugin is configured correctly as per Edwiser Bridge documentation and Single Sign On is configured as per it's documentation.

Test the secret key and check if it shows any error.

Check if you have added the correct WordPress URLs in Single Sign On setting inside your Moodle site.

Check if you have any login-logout redirection plugin enabled in your Moodle as well as WordPress site. If yes, test again by disabling them.