Unity Instantiates prefab at wrong position

I am very new to Unity, however I am trying to instantiate a prefab of a simple ball sprite with a rigid body and a circle collider in a 2D game. See the prefab below, the prefab also has a small script which is to no mains advanced or excessive.

Prefab ball

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BallHandler : MonoBehaviour
{
    private Rigidbody2D _rb;
    private CircleCollider2D _circleCollider;

    private void Awake()
    {
        _rb = GetComponent<Rigidbody2D>();
        _circleCollider = GetComponent<CircleCollider2D>();
    }

    private void Start()
    {
        _rb.isKinematic = true;
        _circleCollider.enabled = false;
    }

    public float GetSize()
    {
        return this.transform.localScale[0];
    }

    public void ShootBall(Vector2 direction, float force)
    {
        _rb.isKinematic = false;
        _circleCollider.enabled = true;

        //Apply force, direct force applied, no acceleration 
        _rb.AddForce(direction * force, ForceMode2D.Impulse);
    }
}

Next I want to be able to shoot the ball later, therefore I use a different script to spawn in the Ball prefabs.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ShooterHandler : MonoBehaviour
{
    [Header("Shooter Stats")]
    [SerializeField] private float _shotForce = 5f;

    [Header("Balls")]
    [SerializeField] private BallHandler _ballPrefab;

    private List<BallHandler> _spawnedBalls = new List<BallHandler>();
    private float _positionX;
    private float _positionY;
    private float _sizeX;
    private float _sizeY;

    private void Awake()
    {
       
    }

    private void Start()
    {
        _positionX = -GameManager.instance.GetBackgroundPosition()[0];
        _positionY = -GameManager.instance.GetBackgroundPosition()[1];
        _sizeX = GameManager.instance.GetBackGroundSize()[0] / 2f;
        _sizeY = GameManager.instance.GetBackGroundSize()[1] / 2f;

        SpawnBall(new Vector2(_positionX, _positionY - _sizeY));
    }

    private void SpawnBall(Vector2 position)
    {
        BallHandler newBall = Instantiate(_ballPrefab, position, Quaternion.identity);
        _spawnedBalls.Add(newBall);
    }
}

I need to spawn the balls at the center of the screen, hence at the X position of the background object and at -0.5 * Y scale of the background object.

Running debug provides the following values:

X Position = 0
Y Position = 0
0.5 * X Scale = 2.809
0.5 * Y Scale = 3.333
Debug Log

Screenshot 2024-02-18 at 19.14.21

However, the position of the ball game object is as follows:

X Position = 0
Y Position = -3.409
Spawned Ball Clone

Instead of a Y position pf -3.333. How is this possible and how can I fix this issue as this ‘bug’ provides me with inaccurate spawning of the balls.

Additionally, spawning the 4 balls at each of the corners gives the following result in the game viewer. It can be seen that one ball is spawned in the wrong position whilst the remaining balls all spawn in the correct position.

4 Corners spawning

How can I fix my code or prefabs to spawn in the balls accurately?

SOLVED

My background contained a Box Collider that collided with the Rigidbody of the ball prefab, due to orientation this provided the wrong input for the position during instantiation.