Unity 2D camera and lighting issues

So I have this code used for my character to move left and right and also jump. I also made it so that when I moves left, the sprite flips to face the left direction. One big issue though is that when I make the camera the player’s child to make it follow the player, the camera flips completely to the other side when turning left instead of staying on one side. And when doing lighting effect, the light only effects the player when moving right, but not when moving left. Is there a way I can make the light impact the player while facing both left and right, while also having the camera not constantly flip sides when turning when it’s the player’s child object?

Thank you

My code is here:

 using UnityEngine;
 using System.Collections;
 
 public class smallbot_movement : MonoBehaviour {
 
     public float moveSpeed;
     public float jumpHeight;
 
     void Update(){
 
         Movement ();
     }
 
     void Movement()
     {
         if(Input.GetKey (KeyCode.D))
         {
             transform.Translate(Vector2.right * moveSpeed * Time.deltaTime);
             transform.eulerAngles = new Vector2(moveSpeed, 0);
         }
         if(Input.GetKey (KeyCode.A))
         {
             transform.Translate(Vector2.right * moveSpeed * Time.deltaTime);
             transform.eulerAngles = new Vector2(moveSpeed, 180);
         }
 
         if(Input.GetKeyDown (KeyCode.Space))
         {
             GetComponent<Rigidbody2D>().velocity = new Vector2(0, jumpHeight);
         }
     }
 }

It also is possible make the camera a child of the player without the camera rotation with the player. But there is a much easier way. Make the camera a single object and write a script that set’s the camera transform.position to the player.transform.position. With this you also have the huge advantage that you can let the camera stop following the player if you want to at any time.

To flip the player just scale on the X-Axis:

Vector3 scale = transform.localScale;

scale.x *= -1;

transform.localScale = scale;

This is not tested, but I think it should work.
I made games like this and never had lightning issues, hope it helps.