How to fix mouse-look goes crazy when going too far?

So, I’m currently working on a 2D, top-down space game. The players ship looks at the mouse position. It all works fine, until the ship flies a certain distance (i tested it and when it reaches 80 on the Y axis is when it starts to flip out. didn’t test on the X axis).

I’d really like some help with this. I have no idea why the steering starts to flip out.

Here’s a link to a video of the issue, so you have a better idea of what’s going on.
1

Anyways, here’s my script for the player controller.

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour {

    Vector2 moveDirection;
    Rigidbody2D shipBody;
    SpriteRenderer shipRenderer;

    public Sprite shipSprite;

    public float speed = 15.0f;
    public float sidewaysThrustMultiplier = 0.25f;
    public float turnSpeed = 15.0f;
    public bool isPowered = false;
    

    void Start ()
    {
        //Get the rigidbody of the player.
        shipBody = gameObject.GetComponent<Rigidbody2D>();

        //Get the sprite renderer of the ship.
        shipRenderer = gameObject.GetComponent<SpriteRenderer>();

        //Set the default ship sprite. [Will be removed when ship selection screen is implemented]
        shipRenderer.sprite = shipSprite;
	}
	

	void Update ()
    {
        //Make sure we can only do things while the ship is powered.
        if (isPowered)
        {
            //Get the direction we want the ship to move based on input.
            moveDirection = new Vector2(Input.GetAxis("Horizontal") * sidewaysThrustMultiplier, Input.GetAxis("Vertical"));
            moveDirection = transform.TransformDirection(moveDirection);
            moveDirection *= speed;

            //Look at mouse position.
            Vector3 mousePosition = Input.mousePosition - Camera.main.WorldToScreenPoint(transform.position);
            float angle = (Mathf.Atan2(mousePosition.y - transform.position.y, mousePosition.x - transform.position.x) * Mathf.Rad2Deg);
            transform.rotation = Quaternion.Lerp(transform.rotation, Quaternion.Euler(0, 0, angle - 90), turnSpeed * Time.deltaTime);
        }
    }

    void FixedUpdate()
    {
        //Move ship in a direction based on the moveDirection variable.
        shipBody.AddForce(moveDirection);
    }
}

It looks as tho your issue is with your angle calculation (Line 43). The problem is that your are mixing world and screen co ordinates in order to determine the angle between the mouse and the ship.
The angle you want should be calculated by the ships position on screen not in world.

The transform values you are using in the angle calculation need to be converted to screen coordinates.

Why your ship spins? This is probably because in the beginning of your vid the world position of your ship (transform.position.y) is probably close enough to the value required to get the angle you want but as your ship moves through the world its going to change, and possible become negative and get further from what you need.