Looking at the link you shared, it looks like you’re using a builder plugin. The reason the content restricted message lacks more formatting is that builders generally include part of the structural HTML markup as part of the content. When the user is not logged in, WP-Members dumps what is in the main content variable – so with a builder, some of that is layout related.
There is a far more detailed discussion of this here: https://rocketgeek.com/tips-and-tricks/handling-form-layout-when-using-a-builder-plugin/
The simplest option is to institute a redirect to a login page when the content is blocked, for which there are a few different ways to approach it (see “Simple Redirect” in the link above).