I wouldn’t recommend using WP_PLUGIN_DIR because if you use a custom setup with a different ABSPATH (like roots/bedrock), then it will fail already.
I would use something like plugin_basename( __FILE__ )
.
Don’t think this will fix your issue (depending on your setup), but it’s good practice to not use WP_PLUGIN_DIR imo.